diff options
author | Andreas Schneider <asn@samba.org> | 2015-01-12 17:33:58 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-13 16:57:10 +0100 |
commit | 6e187c0587247babb805ae0b76b801baa30616b8 (patch) | |
tree | 211db380c00e55941f5880b90b03c3f741cb389f /lib/resolv_wrapper/resolv_wrapper.c | |
parent | 931dbb3202248547bad484667247793d190f7ab0 (diff) | |
download | samba-6e187c0587247babb805ae0b76b801baa30616b8.tar.gz |
rwrap: Fix a possible NULL dereference.
CID: #84271
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'lib/resolv_wrapper/resolv_wrapper.c')
-rw-r--r-- | lib/resolv_wrapper/resolv_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/resolv_wrapper/resolv_wrapper.c b/lib/resolv_wrapper/resolv_wrapper.c index c70ca64e92b..10af3606b61 100644 --- a/lib/resolv_wrapper/resolv_wrapper.c +++ b/lib/resolv_wrapper/resolv_wrapper.c @@ -733,7 +733,7 @@ static int rwrap_get_record(const char *hostfile, unsigned recursion, } } - if (rc == ENOENT && recursion == 0) { + if (rc == ENOENT && recursion == 0 && key != NULL) { RWRAP_LOG(RWRAP_LOG_TRACE, "Record for [%s] not found\n", query); memcpy(rr->key, key, strlen(key) + 1); } |