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/db2823ee5cef
branches:  trunk
changeset: 847388:db2823ee5cef
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 f07df495bdc6 -r db2823ee5cef 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