summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-05-06 15:17:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:02 -0500
commit31d28c5b8cc22fb158a808a1f9d3d0c8ed5d2090 (patch)
tree65d6f4a5cf93c2db0f7c6c7f9f712d1e5c80d030
parentd6121458b0b3cfecb857877e0740560f282cbe48 (diff)
downloadsamba-31d28c5b8cc22fb158a808a1f9d3d0c8ed5d2090.tar.gz
samba-31d28c5b8cc22fb158a808a1f9d3d0c8ed5d2090.tar.bz2
samba-31d28c5b8cc22fb158a808a1f9d3d0c8ed5d2090.zip
r22696: Make sure this is an ascii char
spotted by Volker (This used to be commit e24812016f60f506f0df2cb5ba8c2c6987f7da40)
-rw-r--r--source4/lib/ldb/common/ldb_dn.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index ea7c6b5f69..a277c71ba2 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -292,6 +292,12 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
/* 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 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
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;