svn commit: samba r9766 - in branches/SAMBA_4_0/source/lib/ldb/common: .

jelmer at samba.org jelmer at samba.org
Mon Aug 29 23:20:40 GMT 2005


Author: jelmer
Date: 2005-08-29 23:20:40 +0000 (Mon, 29 Aug 2005)
New Revision: 9766

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9766

Log:
Prevent erroneous OOM message
ldb_dup_val() sets out->data to NULL if in->length == 0

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c	2005-08-29 23:05:26 UTC (rev 9765)
+++ branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c	2005-08-29 23:20:40 UTC (rev 9766)
@@ -38,7 +38,7 @@
 		     const struct ldb_val *in, struct ldb_val *out)
 {
 	*out = ldb_val_dup(mem_ctx, in);
-	if (out->data == NULL) {
+	if (in->length > 0 && out->data == NULL) {
 		ldb_oom(ldb);
 		return -1;
 	}



More information about the samba-cvs mailing list