From 4e7c81084ed696518afcc4fa0ba716b486f9e0a8 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@1453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/sha1/sha1-ruby.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') 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); -- cgit v1.2.3