summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 20:41:51 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 20:41:51 +0000
commit4e7c81084ed696518afcc4fa0ba716b486f9e0a8 (patch)
tree86779a17f3b1db91329483aeb6633042e0488593 /ext
parent10f407b84bbb6fab63b6a4fc4d7da0c688570215 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/sha1/sha1-ruby.c2
1 files changed, 1 insertions, 1 deletions
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);