Add a test for records not on the record boundary
[openssl.git] / crypto / lhash / lhash.c
index 19c6d2c31d5e0734063efaa619d3ec0ca2b4f284..82de2235997935d8963630c6fb0dd45a8c8a21f8 100644 (file)
@@ -213,8 +213,8 @@ static int expand(OPENSSL_LHASH *lh)
         j = (int)lh->num_alloc_nodes * 2;
         n = OPENSSL_realloc(lh->b, (int)(sizeof(OPENSSL_LH_NODE *) * j));
         if (n == NULL) {
-            /* fputs("realloc error in lhash",stderr); */
             lh->error++;
+            lh->num_nodes--;
             lh->p = 0;
             return 0;
         }
@@ -309,11 +309,6 @@ unsigned long OPENSSL_LH_strhash(const char *c)
 
     if ((c == NULL) || (*c == '\0'))
         return (ret);
-/*-
-    unsigned char b[16];
-    MD5(c,strlen(c),b);
-    return(b[0]|(b[1]<<8)|(b[2]<<16)|(b[3]<<24));
-*/
 
     n = 0x100;
     while (*c) {