Browse code

fix NULL pointer dereference in metadata scanner

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1357 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2005/02/25 02:41:33
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Feb 24 18:37:45 CET 2005 (tk)
2
+---------------------------------
3
+  * libclamav/scanners.c: fix NULL pointer dereference in metadata scanner
4
+			  (thanks to Nigel)	
5
+
1 6
 Wed Feb 23 09:42:52 GMT 2005 (njh)
2 7
 ----------------------------------
3 8
   * clamav-milter:	Remove the pid file on exit
... ...
@@ -345,7 +345,7 @@ static int cli_scanzip(int desc, const char **virname, long int *scanned, const
345 345
 
346 346
 	/* Scan metadata */
347 347
 	mdata = root->zip_mlist;
348
-	do {
348
+	if(mdata) do {
349 349
 	    if(mdata->encrypted != encrypted)
350 350
 		continue;
351 351