1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

r22696: Make sure this is an ascii char

spotted by Volker
(This used to be commit e24812016f60f506f0df2cb5ba8c2c6987f7da40)
This commit is contained in:
Simo Sorce 2007-05-06 15:17:14 +00:00 committed by Gerald (Jerry) Carter
parent d6121458b0
commit 31d28c5b8c

View File

@ -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;