From 32083455b6d482f2b16b05f10c5c83e6f1dabfa1 Mon Sep 17 00:00:00 2001 From: cperciva Date: Tue, 9 Aug 2005 08:33:27 +0000 Subject: Replace INT_MAX with OFF_MAX. I used INT_MAX originally (in ports) because OFF_MAX wasn't defined on FreeBSD 4.x. --- usr.sbin/portsnap/phttpget/phttpget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/portsnap/phttpget/phttpget.c b/usr.sbin/portsnap/phttpget/phttpget.c index a68f60f..584ce51 100644 --- a/usr.sbin/portsnap/phttpget/phttpget.c +++ b/usr.sbin/portsnap/phttpget/phttpget.c @@ -403,7 +403,7 @@ main(int argc, char *argv[]) /* Compute the length */ while (isdigit(*hln)) { - if (contentlength > INT_MAX / 10) { + if (contentlength >= OFF_MAX / 10) { /* Nasty people... */ goto conndied; } @@ -488,7 +488,7 @@ main(int argc, char *argv[]) clen = 0; while (isxdigit(*hln)) { - if (clen > INT_MAX / 16) { + if (clen >= OFF_MAX / 16) { /* Nasty people... */ goto conndied; } @@ -528,7 +528,7 @@ main(int argc, char *argv[]) * Read everything until the server closes the * socket. */ - error = copybytes(sd, fd, INT_MAX, resbuf, + error = copybytes(sd, fd, OFF_MAX, resbuf, &resbuflen, &resbufpos); if (error == -1) goto conndied; -- cgit v1.1