Browse code

clamscan/manager.c: fix use of uninitialized value in exclude-pua (bb#1373)

git-svn: trunk@4651

Tomasz Kojm authored on 2009/01/27 19:23:12
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Jan 27 11:46:17 CET 2009 (tk)
2
+---------------------------------
3
+ * clamscan/manager.c: fix use of uninitialized value in exclude-pua (bb#1373)
4
+
1 5
 Mon Jan 26 21:06:36 CET 2009 (tk)
2 6
 ---------------------------------
3 7
  * libclamav: use LibTomMath by Tom St Denis instead of libgmp for multiple
... ...
@@ -365,6 +365,7 @@ int scanmanager(const struct optstruct *opts)
365 365
 	dboptions |= CL_DB_PUA;
366 366
 	if((opt = optget(opts, "exclude-pua"))->enabled) {
367 367
 	    dboptions |= CL_DB_PUA_EXCLUDE;
368
+	    i = 0;
368 369
 	    while(opt) {
369 370
 		if(!(pua_cats = realloc(pua_cats, i + strlen(opt->strarg) + 3))) {
370 371
 		    logg("!Can't allocate memory for pua_cats\n");