From: Thomas Markwalder Date: Wed, 26 Apr 2017 17:35:11 +0000 (-0400) Subject: [v4_1_esv] Fixed segfault in OMAPI when source object has blank values X-Git-Tag: v4_1_esv_r15b1~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f591d739ff52b152956bafa4e61bebfe2bf99351;p=thirdparty%2Fdhcp.git [v4_1_esv] Fixed segfault in OMAPI when source object has blank values Merged rt29108. --- diff --git a/RELNOTES b/RELNOTES index 1823537e2..d43b327fa 100644 --- 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 diff --git a/omapip/generic.c b/omapip/generic.c index 4286b2b60..fe394ca8a 100644 --- a/omapip/generic.c +++ b/omapip/generic.c @@ -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