Browse code

libclamav: cli_cvdverify() patch

David Raynor authored on 2013/04/11 04:28:20
Showing 1 changed files
... ...
@@ -516,6 +516,11 @@ static int cli_cvdverify(FILE *fs, struct cl_cvd *cvdpt, unsigned int cld)
516 516
     }
517 517
 
518 518
     md5 = cli_hashstream(fs, NULL, 1);
519
+    if (md5 == NULL) {
520
+	cli_dbgmsg("cli_cvdverify: Cannot generate hash, out of memory\n");
521
+	cl_cvdfree(cvd);
522
+	return CL_EMEM;
523
+    }
519 524
     cli_dbgmsg("MD5(.tar.gz) = %s\n", md5);
520 525
 
521 526
     if(strncmp(md5, cvd->md5, 32)) {