dhcpd: Verify DICT_VALUE exists itself
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Fri, 30 Jan 2015 11:35:06 +0000 (13:35 +0200)
committerNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Fri, 30 Jan 2015 16:16:32 +0000 (18:16 +0200)
commitdf1013f5b0d642c20adedac36a33df39d6fea92e
tree07f2457c9e7ab3ec66758f0d83405b44b841cdbb
parentff526ad4ad985b94dc6fd30ee5bbce21f1f66e8e
dhcpd: Verify DICT_VALUE exists itself

Verify that a DICT_VALUE was returned from dict_valbyattr by checking
the returned pointer, not the "name" field address. This likely fixes a
possible segfault when debugging.

This also fixes the following Coverity error:

Error: NO_EFFECT (CWE-398):
freeradius-server-2.2.6/src/main/dhcpd.c:300: array_null: Comparing an array to null is not useful: "dv->name".
src/main/dhcpd.c