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/767c174617a3
branches:  trunk
changeset: 967754:767c174617a3
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 5046c8f2e80e -r 767c174617a3 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