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

abartlet at samba.org abartlet at samba.org
Mon Nov 13 03:21:13 GMT 2006


Author: abartlet
Date: 2006-11-13 03:21:13 +0000 (Mon, 13 Nov 2006)
New Revision: 19683

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

Log:
Guard GUID_from_string from walking off the end.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c	2006-11-13 03:20:24 UTC (rev 19682)
+++ branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c	2006-11-13 03:21:13 UTC (rev 19683)
@@ -183,6 +183,9 @@
 
 	if (v->length < 33) return False;
 
+	/* see if the input if null-terninated (safety check for the below) */
+	if (v->data[v->length] != '\0') return False;
+
 	status = GUID_from_string((const char *)v->data, &guid);
 	if (!NT_STATUS_IS_OK(status)) {
 		return False;



More information about the samba-cvs mailing list