diff --git a/RELNOTES b/RELNOTES index cc70b866..c48e36f9 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 4420e81d..4cc5a689 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