summaryrefslogtreecommitdiff
path: root/mail/qscan/files/patch-src__qscan.c
blob: 081a7bdff6eb95cf882246f87ed71896454fd054 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- src/qscan.c.orig	Fri Oct  4 20:44:37 2002
+++ src/qscan.c	Thu Apr  8 16:47:28 2004
@@ -326,8 +326,8 @@
         wait_everybody_and_die(99);
     }
     while (fgets(line, (int) sizeof line, avfp) != NULL) {
-        if (strncmp(SWEEP_VIRUS_PREFIX, line,
-                    sizeof SWEEP_VIRUS_PREFIX - (size_t) 1U) == 0) {
+        register char *virus;
+        if ((virus = strstr(line, SWEEP_VIRUS_PREFIX)) != NULL) {
             register char *crlf;
 
             if (ret < INT_MAX) {
@@ -340,8 +340,9 @@
                    (crlf = strrchr(line, '\r')) != NULL) {
                 *crlf = 0;
             }
-            *foundvirus = strdup(line + 
-                                 sizeof SWEEP_VIRUS_PREFIX - (size_t) 1U);
+            *virus = 0;
+            virus = strrchr(line, ' ');
+            *foundvirus = strdup(++virus);
         }        
     }
     if (fclose(avfp) != 0) {
@@ -479,7 +480,7 @@
         perror_log("unable to create the destdir name");
         return -1;
     }        
-    if (mkdir(ripmime_destdir, (mode_t) 0700) != 0) {
+    if (mkdir(ripmime_destdir, (mode_t) 0750) != 0) {
         if (chdir(ripmime_destdir) != 0) {
             perror_log("unable to create/access ripmime_destdir");
             return -1;