Patch from Scott McKellar to protect SHA-1 against an off-by-one bug
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 7 Aug 2007 15:28:44 +0000 (15:28 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 7 Aug 2007 15:28:44 +0000 (15:28 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1076 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/sha.c

index 14791bd..c48a4c9 100644 (file)
@@ -208,7 +208,7 @@ char *shahash(const char *str)
        INT64 length=0;
 
        int strsz;
        INT64 length=0;
 
        int strsz;
-       static char final[40];
+       static char final[41];
        int *hashval;
 
        hashval = (int *)malloc(20);
        int *hashval;
 
        hashval = (int *)malloc(20);