Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173203320
D58555.id183111.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
912 B
Referenced Files
None
Subscribers
None
D58555.id183111.diff
View Options
diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c
--- a/usr.sbin/ppp/mp.c
+++ b/usr.sbin/ppp/mp.c
@@ -931,8 +931,8 @@
case ENDDISC_MAGIC:
sprintf(result, "Magic: 0x");
header = strlen(result);
- if (len + header + 1 > sizeof result)
- len = sizeof result - header - 1;
+ if (2 * len + header + 1 > sizeof result)
+ len = (sizeof result - header - 1) / 2;
for (f = 0; f < len; f++)
sprintf(result + header + 2 * f, "%02x", address[f]);
break;
@@ -944,8 +944,8 @@
default:
sprintf(result, "%d: ", (int)c);
header = strlen(result);
- if (len + header + 1 > sizeof result)
- len = sizeof result - header - 1;
+ if (2 * len + header + 1 > sizeof result)
+ len = (sizeof result - header - 1) / 2;
for (f = 0; f < len; f++)
sprintf(result + header + 2 * f, "%02x", address[f]);
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 25, 6:53 AM (12 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35788310
Default Alt Text
D58555.id183111.diff (912 B)
Attached To
Mode
D58555: ppp: Avoid overflow when formatting endpoint discriminator options
Attached
Detach File
Event Timeline
Log In to Comment