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

metze at samba.org metze at samba.org
Mon Feb 6 00:27:03 GMT 2006


Author: metze
Date: 2006-02-06 00:27:02 +0000 (Mon, 06 Feb 2006)
New Revision: 13359

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

Log:
make sure we don't look at s[-1]

metze
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	2006-02-05 23:13:44 UTC (rev 13358)
+++ branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c	2006-02-06 00:27:02 UTC (rev 13359)
@@ -69,7 +69,7 @@
 	
 	/* remove trailing spaces if any */
 	l = strlen(s);
-	while (s[l - 1] == ' ') l--;
+	while (l > 0 && s[l - 1] == ' ') l--;
 	s[l] = '\0';
 	
 	/* remove leading spaces if any */



More information about the samba-cvs mailing list