nwrap: catch NULL list in nwrap_add_hname_add_to_existing
authorMichael Adam <obnox@samba.org>
Wed, 11 Nov 2015 11:26:02 +0000 (12:26 +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 d31fca984f03190204a2e7fd28d3a10ae5f53b7c..064d3d7872ad8dcc4e52cd8c8fb279e744362f62 100644 (file)
@@ -2629,6 +2629,11 @@ static bool nwrap_add_hname_add_to_existing(struct nwrap_entdata *const ed,
        struct nwrap_entlist *cursor;
        struct nwrap_entlist *el_new;
 
+       if (el == NULL) {
+               NWRAP_LOG(NWRAP_LOG_ERROR, "list is NULL, can not add");
+               return false;
+       }
+
        el_new = nwrap_entlist_init(ed);
        if (el_new == NULL) {
                return false;