summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2017-04-26 13:19:57 -0400
committerThomas Markwalder <tmark@isc.org>2017-04-26 13:19:57 -0400
commit48ffe4b8d366792e6fbc0eaa7a8dc5be5c469213 (patch)
tree18799f5f1e354ad13ef6f7dd8eb60b06adb37cce
parentece2d9da1991cf597eaa391ec46e75910e6c693f (diff)
downloadisc-dhcp-48ffe4b8d366792e6fbc0eaa7a8dc5be5c469213.tar.gz
[master] Fixed segfault in OMAPI when source object has blank values
Merged rt29108.
-rw-r--r--RELNOTES6
-rw-r--r--omapip/generic.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index 5d1d6167..873b3661 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 6dee8019..fa6e5f88 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