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

RELNOTES
omapip/generic.c

index 1823537e26240defb7428c396987b8987ddb30ab..d43b327fa8c307685bdbd0cdf33b781cf10904ae 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -90,6 +90,12 @@ by Eric Young (eay@cryptsoft.com).
   [ISC-Bugs #25428]
   [ISC-Bugs #31940]
 
+- 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.1-ESV-R14b1
 - None
 
index 4286b2b6087be1df4a59a34b803a28e5013e25f0..fe394ca8a2a9f377db85575ba3440f4c360ecb54 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