Merge branch '1211-potential-null-pointer-dereference-in-isc_ht_find-in-9-11' into 'v9_11'

Resolve "Potential NULL pointer dereference in isc_ht_find in 9.11"

See merge request isc-projects/bind9!2310
This commit is contained in:
Mark Andrews
2019-09-06 02:05:44 -04:00
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
5290. [bug] Address potential NULL pointer dereference in
isc_ht_find. [GL #1211]
5287. [bug] Address potential NULL pointer dereference. [GL #1208]
5286. [contrib] Address potential NULL pointer dereferences in

View File

@@ -169,7 +169,9 @@ isc_ht_find(const isc_ht_t *ht, const unsigned char *key,
while (node != NULL) {
if (keysize == node->keysize &&
memcmp(key, node->key, keysize) == 0) {
*valuep = node->value;
if (valuep != NULL) {
*valuep = node->value;
}
return (ISC_R_SUCCESS);
}
node = node->next;