Date: Thu, 28 Jul 2005 15:44:33 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 81122 for review Message-ID: <200507281544.j6SFiX8a060909@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=81122 Change 81122 by sam@sam_ebb on 2005/07/28 15:43:56 sync with head Affected files ... .. //depot/projects/wifi/sbin/dhclient/options.c#3 edit Differences ... ==== //depot/projects/wifi/sbin/dhclient/options.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.14 2004/11/02 01:18:45 deraadt Exp $ */ +/* $OpenBSD: options.c,v 1.15 2004/12/26 03:17:07 deraadt Exp $ */ /* DHCP options parsing and reassembly. */ @@ -600,7 +600,7 @@ case 'l': opcount = snprintf(op, opleft, "%ld", (long)getLong(dp)); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; dp += 4; @@ -608,7 +608,7 @@ case 'L': opcount = snprintf(op, opleft, "%ld", (unsigned long)getULong(dp)); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; dp += 4; @@ -616,7 +616,7 @@ case 's': opcount = snprintf(op, opleft, "%d", getShort(dp)); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; dp += 2; @@ -624,7 +624,7 @@ case 'S': opcount = snprintf(op, opleft, "%d", getUShort(dp)); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; dp += 2; @@ -632,19 +632,19 @@ case 'b': opcount = snprintf(op, opleft, "%d", *(char *)dp++); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; break; case 'B': opcount = snprintf(op, opleft, "%d", *dp++); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; break; case 'x': opcount = snprintf(op, opleft, "%x", *dp++); - if (opcount >= opleft) + if (opcount >= opleft || opcount == -1) goto toobig; opleft -= opcount; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507281544.j6SFiX8a060909>