Browse code

strcat bug fix

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

Tomasz Kojm authored on 2004/02/21 21:38:03
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Feb 21 13:38:23 CET 2004 (tk)
2
+---------------------------------
3
+  * libclamav: fixed various segmentation faults introduced by a small bug
4
+	       in the yesterday's patch from Phil Oleson. Thanks to Nigel.
5
+
1 6
 Sat Feb 21 11:09:12 GMT 2004 (njh)
2 7
 ----------------------------------
3 8
   * clamav-milter:	Don't run if the quarantine-dir is publically accessable
... ...
@@ -306,9 +306,7 @@ char *cl_gentemp(const char *dir)
306 306
 	cli_dbgmsg("cl_gentemp('%s'): out of memory\n", dir);
307 307
 	return NULL;
308 308
     }
309
-    cnt += sprintf(name, "%s", mdir);
310
-    if(!strrchr(name, '/'))
311
-        strcat(name, '/');
309
+    cnt += sprintf(name, "%s/", mdir);
312 310
 
313 311
     do {
314 312
 	for(i = 0; i < 32; i++)