Unchecked isc_mem_get's in dnssec-signzone.c and socket.c
isc_mem_get() can still return NULL on quota failures even with exiting on malloc() failure.
Note there are multiple failures reported here.
673 key = ISC_LIST_NEXT(key, link))
674 {
CID 1441414 (#3 of 3): Dereference null return value (NULL_RETURNS)
14. dereference: Dereferencing a null pointer nowsignedby.
675 if (nowsignedby[key->index])
676 continue;
3752
3753 }
3754
CID 1441417 (#5 of 5): Dereference null return value (NULL_RETURNS)
24. dereference: Dereferencing a pointer that might be null thread->epoll_events when calling watch_fd. [show details]
3755 result = watch_fd(thread, thread->pipe_fds[0], SELECT_POKE_READ);
3756 return (result);
1900 isc__socket_t *sock;
1901
1. returned_null: isc__mem_get returns null. [Note: The source code implementation of the function has been overridden by a user model.]
2. var_assigned: Assigning: sock = null return value from isc__mem_get.
1902 sock = isc_mem_get(manager->mctx, sizeof(*sock));
1903
CID 1441418 (#1 of 1): Dereference null return value (NULL_RETURNS)
3. dereference: Dereferencing a null pointer sock.
1904 sock->common.magic = 0;
3942 */
10. returned_null: isc__mem_get returns null. [Note: The source code implementation of the function has been overridden by a user model.]
11. var_assigned: Assigning: manager->threads = null return value from isc__mem_get.
3943 manager->threads = isc_mem_get(mctx, sizeof(isc__socketthread_t)
3944 * manager->nthreads);
3945 isc_mem_attach(mctx, &manager->mctx);
3946
12. Condition i < manager->nthreads, taking true branch.
3947 for (i=0; i < manager->nthreads; i++) {
CID 1441421 (#2 of 2): Dereference null return value (NULL_RETURNS)
13. dereference: Dereferencing a null pointer manager->threads.
3948 manager->threads[i].manager = manager;
Edited by Mark Andrews