File: top-command.patch

package info (click to toggle)
qpopper 2.3-4
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 560 kB
  • ctags: 415
  • sloc: ansic: 4,967; makefile: 153; sh: 43
file content (14 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- pop_send.c.orig	Mon May 18 21:20:22 1998
+++ pop_send.c	Mon May 18 21:23:28 1998
@@ -59,7 +59,10 @@
     /*  If this is a TOP command, get the number of lines to send */
     if (strcmp(p->pop_command,"top") == 0) {
         /*  Convert the second parameter into an integer */
-        msg_lines = atoi(p->pop_parm[2]) + 1;
+        msg_lines = atoi(p->pop_parm[2]);
+	/* We should use MAXINT but oh well .. */
+	if (msg_lines >= 2147483647 || msg_lines < 0) msg_lines = 2147483646;
+	msg_lines++;
 	msg_lines = msg_lines > mp->body_lines ? mp->body_lines : msg_lines; 
     }
     else {