From d32eac2e0249b27e6c60bfd0cf0ed0e96622b995 Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 24 May 2001 20:41:51 +0000 Subject: * ext/sha1/sha1-ruby.c (sha1_hexdigest): fix buffer overflow. The buffer for a SHA-1 hexdigest needs to be 41 bytes in length. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/sha1/sha1-ruby.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 62eca15e4..f8a3eb06e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 25 05:39:03 2001 Akinori MUSHA + + * 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 * 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 75b382640..abd704c63 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); -- cgit