]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Don't try to look up an object if we didn't get a description with which
authorTed Lemon <source@isc.org>
Thu, 14 Oct 1999 18:15:56 +0000 (18:15 +0000)
committerTed Lemon <source@isc.org>
Thu, 14 Oct 1999 18:15:56 +0000 (18:15 +0000)
  to do the lookup (since this would cause a core dump!).

omapip/message.c

index 5e51a204c027003f32624b9e03eb57f14f16423b..fcc5423cb0d061079febb7af10c7df6bf27913c8 100644 (file)
@@ -483,6 +483,13 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
                                 ISC_R_NOTIMPLEMENTED, message -> id,
                                 "unsearchable object type");
                }
+
+               if (!message -> object) {
+                       return omapi_protocol_send_status
+                               (po, (omapi_object_t *)0,
+                                ISC_R_NOTFOUND, message -> id,
+                                "no lookup key specified");
+               }
                status = (*(type -> lookup)) (&object, (omapi_object_t *)0,
                                              message -> object);