From: Evan Hunt Date: Tue, 6 May 2008 22:59:51 +0000 (+0000) Subject: Fix a coredump when adding a class via OMAPI [rt17162] X-Git-Tag: v4_1_0a2~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61220a00915e7386297b44c043bcfd0934b0d73c;p=thirdparty%2Fdhcp.git Fix a coredump when adding a class via OMAPI [rt17162] --- diff --git a/RELNOTES b/RELNOTES index cc70b8667..c48e36f97 100644 --- a/RELNOTES +++ b/RELNOTES @@ -50,6 +50,8 @@ work on other platforms. Please report any problems and suggested fixes to Changes since 4.1.0a1 +- Fixed a coredump when adding a class via OMAPI. + - Check whether files are zero length before trying to parse them. - Ari Edelkind's PARANOIA patch has been included and may be compiled in diff --git a/server/omapi.c b/server/omapi.c index 4420e81dc..4cc5a6895 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -1869,11 +1869,10 @@ class_set_value (omapi_object_t *h, if (!strncmp("hardware", (char *)value->u.buffer.value, minlen)) { - if (!expression_allocate(&class->submatch, - MDL)) + if (!expression_allocate(&class->submatch, MDL)) return ISC_R_NOMEMORY; - class->expr->op = expr_hardware; + class->submatch->op = expr_hardware; } else return ISC_R_INVALIDARG; } else