Replace INT_MAX with OFF_MAX. I used INT_MAX originally (in ports)

because OFF_MAX wasn't defined on FreeBSD 4.x.
This commit is contained in:
Colin Percival 2005-08-09 08:33:27 +00:00
parent f79293da85
commit 3ad7e67045

View File

@ -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;