[PATCH] atoi() -> atol() in art.c

Dennis Preiser <[email protected]> Tue, 1 Nov 2011 20:11:41 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
In art.c we read in article numbers from NNTP-responses via atoi(). I
think this should be atol().

Dennis

diff -urp tin-2.1.0_r4/src/art.c tin-2.1.0_r5/src/art.c
--- tin-2.1.0_r4/src/art.c	2011-09-12 23:23:31.000000000 +0200
+++ tin-2.1.0_r5/src/art.c	2011-11-01 19:42:51.000000000 +0100
@@ -248,7 +248,7 @@ setup_hard_base(
 			while ((ptr = tin_fgets(fp, FALSE)) != NULL) {
 				if (grpmenu.max >= max_art)
 					expand_art();
-				base[grpmenu.max++] = atoi(ptr);
+				base[grpmenu.max++] = atol(ptr);
 			}
 
 			if (tin_errno)
@@ -591,7 +591,7 @@ open_art_header(
 		i = new_nntp_command("NEXT", OK_NOTEXT, buf, sizeof(buf));
 		switch (i) {
 			case OK_NOTEXT:
-				*next = atoi(buf);		/* Set next art number */
+				*next = atol(buf);		/* Set next art number */
 				break;
 
 #	ifndef BROKEN_LISTGROUP
@@ -608,7 +608,7 @@ open_art_header(
 				if ((fp = nntp_command(buf, OK_HEAD, NULL, 0)) != NULL)
 					return fp;
 				if (nntp_command("NEXT", OK_NOTEXT, buf, sizeof(buf)))
-					*next = atoi(buf);
+					*next = atol(buf);
 				break;
 #	endif /* !BROKEN_LISTGROUP */