From: Ted Lemon Date: Sun, 1 Oct 2000 21:41:34 +0000 (+0000) Subject: Don't dump core when sending a name/value pair with a null value. X-Git-Tag: V3-BETA-2-PATCH-7~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b0068537ad0873fb91071722d345a37d7f35cc;p=thirdparty%2Fdhcp.git Don't dump core when sending a name/value pair with a null value. --- diff --git a/omapip/buffer.c b/omapip/buffer.c index cc7b514bc..01797ef69 100644 --- a/omapip/buffer.c +++ b/omapip/buffer.c @@ -447,6 +447,10 @@ isc_result_t omapi_connection_write_typed_data (omapi_object_t *c, isc_result_t status; omapi_handle_t handle; + /* Null data is valid. */ + if (!data) + return omapi_connection_put_uint32 (c, 0); + switch (data -> type) { case omapi_datatype_int: status = omapi_connection_put_uint32 (c, sizeof (u_int32_t));