]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't dump core when sending a name/value pair with a null value.
authorTed Lemon <source@isc.org>
Sun, 1 Oct 2000 21:41:34 +0000 (21:41 +0000)
committerTed Lemon <source@isc.org>
Sun, 1 Oct 2000 21:41:34 +0000 (21:41 +0000)
omapip/buffer.c

index cc7b514bc5719328605f10f08ac27aabbc6c58ad..01797ef69d6499cd7d59f3628953ce0191794888 100644 (file)
@@ -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));