]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Fixed segfault in OMAPI when source object has blank values
authorThomas Markwalder <tmark@isc.org>
Wed, 26 Apr 2017 17:19:57 +0000 (13:19 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 26 Apr 2017 17:19:57 +0000 (13:19 -0400)
    Merged rt29108.

RELNOTES
omapip/generic.c

index 5d1d6167aeb14f03e3174f7c4b9d45d9edb330a1..873b3661883540d48088a23b693eb99ba59d582f 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -147,6 +147,12 @@ by Eric Young (eay@cryptsoft.com).
   [ISC-Bugs #43219]
   [ISC-Bugs #45051]
 
+- Fixed a bug in OMAPI that causes omshell to crash when a name-value
+  pair with a zero length value is shipped in an object. Thanks to
+  Fernando Soto at BlueCat Networks for reporting the issue and
+  supplying the patch.
+  [ISC-Bugs #29108]
+
                        Changes since 4.3.0 (bug fixes)
 
 - Tidy up several small tickets.
index 6dee8019b3bab2eaa8bbcad6074d061c41257c5a..fa6e5f889805fea5da6f6aba240e8ab0ddc10061 100644 (file)
@@ -62,6 +62,9 @@ isc_result_t omapi_generic_set_value (omapi_object_t *h,
           the generic object, and if so, replace the current value
           with the new one. */
        for (i = 0; i < g -> nvalues; i++) {
+               if (!g -> values[i])
+                       continue;
+
                if (!omapi_data_string_cmp (name, g -> values [i] -> name)) {
                        /* There's an inconsistency here: the standard
                           behaviour of a set_values method when