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

idra at samba.org idra at samba.org
Sun May 6 15:17:15 GMT 2007


Author: idra
Date: 2007-05-06 15:17:14 +0000 (Sun, 06 May 2007)
New Revision: 22696

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

Log:

Make sure this is an ascii char
spotted by Volker


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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c	2007-05-06 13:46:30 UTC (rev 22695)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c	2007-05-06 15:17:14 UTC (rev 22696)
@@ -292,6 +292,12 @@
 				/* first char */
 				trim = false;
 
+				if (!isascii(*p)) {
+					/* attr names must be ascii only */
+					dn->invalid = true;
+					goto failed;
+				}
+
 				if (isdigit(*p)) {
 					is_oid = true;
 				} else
@@ -338,6 +344,12 @@
 				continue;
 			}
 
+			if (!isascii(*p)) {
+				/* attr names must be ascii only */
+				dn->invalid = true;
+				goto failed;
+			}
+
 			if (is_oid && ( ! (isdigit(*p) || (*p == '.')))) {
 				/* not a digit nor a dot, invalid attribute oid */
 				dn->invalid = true;



More information about the samba-cvs mailing list