aboutsummaryrefslogtreecommitdiffstats
path: root/mail/popper/files/patch-an
blob: cac9402c982110fc0adc0cbc59f83a2b7bdfc9b6 (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
35
36
37
38
39
40
41
42
43
44
45
46
--- pop_uidl.c.orig Thu Jul  9 16:44:08 1998
+++ pop_uidl.c  Thu May 25 00:45:38 2000
@@ -59,7 +59,7 @@
 
    sprintf(buffer, "%d %s", msg_id, mp->uidl_str);
         if (nl = index(buffer, NEWLINE)) *nl = 0;
-   return (pop_msg (p,POP_SUCCESS, buffer));
+   return (pop_msg (p,POP_SUCCESS, "%s", buffer));
       }
     } else {
    /* yes, we can do this */
@@ -98,6 +98,7 @@
 {
   static char buf[MAXLINELEN];
   char *cp;
+  char *bp;
 
     fseek(p->drop, mp->offset, 0);
     while (fgets(buf, sizeof(buf), p->drop) != NULL) {
@@ -105,6 +106,8 @@
       if (!strncasecmp("From:", buf, 5)) {
    cp = index(buf, ':');
    while (*++cp && (*cp == ' ' || *cp == '\t'));
+   if ((bp = index(cp, NEWLINE)) != NULL)
+     *bp = 0;
    return(cp);
       }
     }
@@ -149,7 +152,7 @@
    sprintf(buffer, "%d %s", msg_id, mp->uidl_str);
         if (nl = index(buffer, NEWLINE)) *nl = 0;
    sprintf(buffer, "%s %d %.128s", buffer, mp->length, from_hdr(p, mp));
-   return (pop_msg (p,POP_SUCCESS, buffer));
+   return (pop_msg (p,POP_SUCCESS, "%s", buffer));
       }
     } else {
    /* yes, we can do this */
@@ -165,7 +168,7 @@
 
        sprintf(buffer, "%d %s", x, mp->uidl_str);
        if (nl = index(buffer, NEWLINE)) *nl = 0;       
-       sprintf(buffer, "%s %d %.128s", buffer, mp->length, from_hdr(p, mp));
+       sprintf(buffer, "%s %d %.128s\n", buffer, mp->length, from_hdr(p, mp));
        pop_sendline(p, buffer);
         }
     }