summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2017-04-26 13:30:12 -0400
committerThomas Markwalder <tmark@isc.org>2017-04-26 13:30:12 -0400
commit416714653c3d2ebd2a42c68e063bb5aabd5bcab5 (patch)
tree8373f1babeedce0b9be38320f546fc889e369646
parent8e78af702ccd8d3660dbfdb6a5c53986f6f315da (diff)
downloadisc-dhcp-416714653c3d2ebd2a42c68e063bb5aabd5bcab5.tar.gz
[v4_3] 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 40ddf5aa..ef70f70c 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -89,6 +89,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.3.5b1
- Corrected a bug which could cause the server to sporadically crash while
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