Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169995257
D59054.id184607.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
915 B
Referenced Files
None
Subscribers
None
D59054.id184607.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
@@ -1020,9 +1020,14 @@
mp->cfg.enddisc.len = 20;
} else if (!strcasecmp(arg->argv[arg->argn], "psn")) {
if (arg->argc > arg->argn+1) {
- mp->cfg.enddisc.class = ENDDISC_PSN;
- strcpy(mp->cfg.enddisc.address, arg->argv[arg->argn+1]);
- mp->cfg.enddisc.len = strlen(mp->cfg.enddisc.address);
+ if (strlcpy(mp->cfg.enddisc.address, arg->argv[arg->argn+1],
+ sizeof(mp->cfg.enddisc.address)) >= sizeof(mp->cfg.enddisc.address)) {
+ log_Printf(LogWARN, "PSN endpoint too long\n");
+ return 7;
+ } else {
+ mp->cfg.enddisc.class = ENDDISC_PSN;
+ mp->cfg.enddisc.len = strlen(mp->cfg.enddisc.address);
+ }
} else {
log_Printf(LogWARN, "PSN endpoint requires additional data\n");
return 5;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 4, 5:20 AM (19 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37048394
Default Alt Text
D59054.id184607.diff (915 B)
Attached To
Mode
D59054: ppp: Fix a buffer overflow in the endpoint discriminator set command
Attached
Detach File
Event Timeline
Log In to Comment