1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
knu 2001-05-24 20:41:51 +00:00
parent 10f407b84b
commit 4e7c81084e
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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);