diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/sha1/sha1-ruby.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri May 25 05:39:03 2001 Akinori MUSHA <knu@iDaemons.org> + + * ext/sha1/sha1-ruby.c (sha1_hexdigest): fix buffer overflow. The + buffer for a SHA-1 hexdigest needs to be 41 bytes in length. + Fri May 25 01:47:39 2001 Akinori MUSHA <knu@iDaemons.org> * MANIFEST: update the entries I forgot to add or remove. diff --git a/ext/sha1/sha1-ruby.c b/ext/sha1/sha1-ruby.c index 75b3826407..abd704c638 100644 --- a/ext/sha1/sha1-ruby.c +++ b/ext/sha1/sha1-ruby.c @@ -37,7 +37,7 @@ sha1_hexdigest(obj) { SHA1_CTX *sha1, ctx; unsigned char digest[20]; - char buf[33]; + char buf[41]; int i; Data_Get_Struct(obj, SHA1_CTX, sha1); |