PERFORCE change 81122 for review
Sam Leffler
sam at FreeBSD.org
Thu Jul 28 15:44:36 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=81122
Change 81122 by sam at 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;
More information about the p4-projects
mailing list