Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/roy]: src/external/bsd/dhcpcd/dist/src Update to dhcpcd-8.1.4 with the f...



details:   https://anonhg.NetBSD.org/src/rev/605982f0f16c
branches:  roy
changeset: 466416:605982f0f16c
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Dec 20 22:23:55 2019 +0000

description:
Update to dhcpcd-8.1.4 with the following change:

 * options: Fix allocating the script option

diffstat:

 external/bsd/dhcpcd/dist/src/defs.h       |   2 +-
 external/bsd/dhcpcd/dist/src/if-options.c |  12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 933f1e30ad66 -r 605982f0f16c external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Fri Dec 20 12:00:18 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Fri Dec 20 22:23:55 2019 +0000
@@ -29,7 +29,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "8.1.3"
+#define VERSION                        "8.1.4"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 933f1e30ad66 -r 605982f0f16c external/bsd/dhcpcd/dist/src/if-options.c
--- a/external/bsd/dhcpcd/dist/src/if-options.c Fri Dec 20 12:00:18 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/if-options.c Fri Dec 20 22:23:55 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