Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/dhcpcd/dist/src Sync
details: https://anonhg.NetBSD.org/src/rev/49da1d9622d4
branches: trunk
changeset: 466414:49da1d9622d4
user: roy <roy%NetBSD.org@localhost>
date: Fri Dec 20 22:24:59 2019 +0000
description:
Sync
diffstat:
external/bsd/dhcpcd/dist/src/if-options.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 2c86dcaad08b -r 49da1d9622d4 external/bsd/dhcpcd/dist/src/if-options.c
--- a/external/bsd/dhcpcd/dist/src/if-options.c Fri Dec 20 22:23:55 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/if-options.c Fri Dec 20 22:24:59 2019 +0000
@@ -393,8 +393,16 @@
str++;
}
}
- if (flags == PARSE_STRING_NULL && sbuf)
- *sbuf = '\0';
+ if (flags == PARSE_STRING_NULL) {
+ l++;
+ if (sbuf != NULL) {
+ if (l > slen) {
+ errno = ENOBUFS;
+ return -1;
+ }
+ *sbuf = '\0';
+ }
+ }
return (ssize_t)l;
}
Home |
Main Index |
Thread Index |
Old Index