From: Thomas Markwalder Date: Wed, 26 Apr 2017 17:19:57 +0000 (-0400) Subject: [master] Fixed segfault in OMAPI when source object has blank values X-Git-Tag: v4_4_0b1_f1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48ffe4b8d366792e6fbc0eaa7a8dc5be5c469213;p=thirdparty%2Fdhcp.git [master] Fixed segfault in OMAPI when source object has blank values Merged rt29108. --- diff --git a/RELNOTES b/RELNOTES index 5d1d6167a..873b36618 100644 --- 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. diff --git a/omapip/generic.c b/omapip/generic.c index 6dee8019b..fa6e5f889 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