Browse code

fix bb#495

git-svn: trunk@3270

Tomasz Kojm authored on 2007/10/06 06:48:57
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Oct  5 22:50:37 CEST 2007 (tk)
2
+----------------------------------
3
+  * libclamav/pe.c: fix bb#495
4
+
1 5
 Fri Oct  5 14:30:38 CEST 2007 (tk)
2 6
 ----------------------------------
3 7
   * libclamav/readdb.c: code cleanup
... ...
@@ -335,6 +335,11 @@ int cli_scanpe(int desc, cli_ctx *ctx)
335 335
 	struct cli_matcher *md5_sect;
336 336
 
337 337
 
338
+    if(!ctx) {
339
+	cli_errmsg("cli_scanpe: ctx == NULL\n");
340
+	return CL_ENULLARG;
341
+    }
342
+
338 343
     if(cli_readn(desc, &e_magic, sizeof(e_magic)) != sizeof(e_magic)) {
339 344
 	cli_dbgmsg("Can't read DOS signature\n");
340 345
 	return CL_CLEAN;