summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_syntax.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 8be87df827..afb53377fe 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -254,6 +254,10 @@ static WERROR dsdb_syntax_BOOL_validate_ldb(const struct dsdb_syntax_ctx *ctx,
for (i=0; i < in->num_values; i++) {
int t, f;
+ if (in->values[i].length == 0) {
+ return WERR_DS_INVALID_ATTRIBUTE_SYNTAX;
+ }
+
t = strncmp("TRUE",
(const char *)in->values[i].data,
in->values[i].length);
@@ -1379,6 +1383,11 @@ static WERROR _dsdb_syntax_OID_validate_numericoid(const struct dsdb_syntax_ctx
char *oid_out;
const char *oid = (const char*)in->values[i].data;
+ if (in->values[i].length == 0) {
+ talloc_free(tmp_ctx);
+ return WERR_DS_INVALID_ATTRIBUTE_SYNTAX;
+ }
+
if (!ber_write_OID_String(tmp_ctx, &blob, oid)) {
DEBUG(0,("ber_write_OID_String() failed for %s\n", oid));
talloc_free(tmp_ctx);