nwrap: catch NULL ip in nwrap_add_ai
authorMichael Adam <obnox@samba.org>
Wed, 11 Nov 2015 11:24:53 +0000 (12:24 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:30 +0000 (12:25 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/nss_wrapper/nss_wrapper.c

index aee5ff77714ea828b8185d8aee4ae06db31646b8..8b0103e1db616902dad1ad8e21bfaaea04db5617 100644 (file)
@@ -2571,6 +2571,11 @@ static bool nwrap_add_ai(char *const ip_addr, struct nwrap_entdata *const ed)
        ENTRY *p;
        struct nwrap_entlist *el;
 
+       if (ip_addr == NULL) {
+               NWRAP_LOG(NWRAP_LOG_ERROR, "ip_addr NULL - can't add");
+               return false;
+       }
+
        el = nwrap_entlist_init(ed);
        if (el == NULL) {
                return false;