diff options
author | Andreas Schneider <asn@samba.org> | 2015-01-12 12:45:38 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2015-01-12 17:27:26 +0100 |
commit | a0839bd4f3e503f4d34c6a29145d005a65eb5538 (patch) | |
tree | cd0b1694a15f8b5316ed939efe5d929b52038675 | |
parent | 2f37b07dec61f4e4aa92799c4b0857379619f266 (diff) | |
download | resolv_wrapper-a0839bd4f3e503f4d34c6a29145d005a65eb5538.tar.gz resolv_wrapper-a0839bd4f3e503f4d34c6a29145d005a65eb5538.tar.xz resolv_wrapper-a0839bd4f3e503f4d34c6a29145d005a65eb5538.zip |
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>
-rw-r--r-- | src/resolv_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c index c70ca64..10af360 100644 --- a/src/resolv_wrapper.c +++ b/src/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); } |