r19901: Fix a potential NULL dereference
authorVolker Lendecke <vlendec@samba.org>
Sat, 25 Nov 2006 17:19:42 +0000 (17:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:28:33 +0000 (14:28 -0500)
(This used to be commit 75e6fb9654f10a076ed49b0582b40368e149d30a)

source4/lib/ldb/common/ldb_dn.c

index 38d9ea3aff44025d0ae39fdc7f99b53127ec3c01..f76c3441e71e3d90279d35e1635971400a7f9d33 100644 (file)
@@ -251,6 +251,9 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
 
        /* Components data space is allocated here once */
        data = talloc_array(dn->components, char, strlen(dn->linearized) + 1);
+       if (!data) {
+               return false;
+       }
 
        p = dn->linearized;
        in_attr = true;