diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-04-26 13:35:11 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-04-26 13:35:11 -0400 |
commit | f591d739ff52b152956bafa4e61bebfe2bf99351 (patch) | |
tree | 8cac74216ecddc34da930d5f803f608fddd4b900 | |
parent | ca90a25308b6822eb975c8eb60da21ef6a0a4689 (diff) | |
download | isc-dhcp-f591d739ff52b152956bafa4e61bebfe2bf99351.tar.gz |
[v4_1_esv] Fixed segfault in OMAPI when source object has blank values
Merged rt29108.
-rw-r--r-- | RELNOTES | 6 | ||||
-rw-r--r-- | omapip/generic.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -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 4286b2b6..fe394ca8 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 |