File: maxline1024.patch

package info (click to toggle)
qpopper 2.53-7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 656 kB
  • ctags: 372
  • sloc: ansic: 5,020; makefile: 132; sh: 54
file content (35 lines) | stat: -rw-r--r-- 1,201 bytes parent folder | download
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
--- pop_send.c.org      Thu Mar 28 18:22:52 2002
+++ pop_send.c  Thu Mar 28 18:26:38 2002
@@ -115,9 +115,14 @@

     /*  Send the message body */
     while(fgets(buffer, MAXMSGLINELEN, p->drop)) {
+       int nchar;

-        /*  Decrement the lines sent (for a TOP command) */
-        if (--msg_lines <= 0) break;
+       nchar = strlen(buffer);
+
+       if(nchar > 0 && buffer[nchar-1] == '\n') {
+               /*  Decrement the lines sent (for a TOP command) */
+               if (--msg_lines <= 0) break;
+       }

         pop_sendline(p,buffer);

--- pop_updt.c.org      Mon Nov  5 19:11:09 2001
+++ pop_updt.c  Mon Nov  5 19:15:15 2001
@@ -300,7 +300,12 @@
                        break;

                    } else { /* Body */
-                       if (++body_lines > mp->body_lines)
+                       int nchar;
+                       nchar = strlen(buffer);
+                       if(nchar > 0 && buffer[nchar-1] == '\n') {
+                           body_lines++;
+                       }
+                       if (body_lines > mp->body_lines)
                            break;
                        if (fputs(buffer, md) == EOF)
                            break;