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

tridge at samba.org tridge at samba.org
Mon Jun 13 05:56:46 GMT 2005


Author: tridge
Date: 2005-06-13 05:56:46 +0000 (Mon, 13 Jun 2005)
New Revision: 7516

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

Log:
make sure binary decoding gives us something we can run string functions on

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c	2005-06-13 05:33:55 UTC (rev 7515)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_parse.c	2005-06-13 05:56:46 UTC (rev 7516)
@@ -136,7 +136,7 @@
 	struct ldb_val ret;
 	int slen = strlen(str);
 
-	ret.data = talloc_size(ctx, slen);
+	ret.data = talloc_size(ctx, slen+1);
 	ret.length = 0;
 	if (ret.data == NULL) return ret;
 
@@ -155,6 +155,7 @@
 		}
 	}
 	ret.length = j;
+	((uint8_t *)ret.data)[j] = 0;
 
 	return ret;
 }



More information about the samba-cvs mailing list