projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f1a870
)
Fix a nasty bug in the decryption code.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 22 Jan 2010 05:18:05 +0000
(21:18 -0800)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 22 Jan 2010 05:18:05 +0000
(21:18 -0800)
This was a typo but it led to various types of memory corruption; after
decrypting the returned string was marked as being larger than it should
have been--also meaning that the last bytes in the buffer were off in
unallocated space.
bluesky/crypto.c
patch
|
blob
|
history
diff --git
a/bluesky/crypto.c
b/bluesky/crypto.c
index
adf7d03
..
4490e8c
100644
(file)
--- a/
bluesky/crypto.c
+++ b/
bluesky/crypto.c
@@
-137,5
+137,5
@@
BlueSkyRCStr *bluesky_crypt_decrypt(BlueSkyRCStr *in, const uint8_t *key)
gcry_cipher_close(handle);
- return bluesky_string_new(out, in->len
+
CRYPTO_BLOCK_SIZE);
+ return bluesky_string_new(out, in->len
-
CRYPTO_BLOCK_SIZE);
}