summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-03-25 11:13:24 -0700
committerAndrew Bartlett <abartlet@samba.org>2019-05-15 21:26:12 +0000
commitb3bfad39d64eab0e3a9218182b34385c2a397ff5 (patch)
tree2cbbf4fcdb2694717c814d1bcb321936efbf7010 /source3/registry
parent226544f6f5699891bbd933361c65750a26cfaccf (diff)
downloadsamba-b3bfad39d64eab0e3a9218182b34385c2a397ff5.tar.gz
s3: net: Harden act_val_hex() act_val_sz() against errors.
Found by Michael Hanselmann using fuzzing tools BUG: https://bugzilla.samba.org/show_bug.cgi?id=13842 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/registry/reg_parse.c b/source3/registry/reg_parse.c
index 3093e6acf76..caf2a063b02 100644
--- a/source3/registry/reg_parse.c
+++ b/source3/registry/reg_parse.c
@@ -117,6 +117,7 @@ static bool act_val_hex(struct reg_parse* p, cbuf* value, bool cont)
cbuf_swapptr(p->valblob, &dst, dlen);
} else {
DEBUG(0, ("iconvert_talloc failed\n"));
+ return false;
}
talloc_free(dst);
}
@@ -166,6 +167,7 @@ static bool act_val_sz(struct reg_parse* p, cbuf* value, bool cont)
} else {
DEBUG(0, ("convert_string_talloc failed: >%s<\n"
"use it as is\t", src));
+ return false;
}
talloc_free(dst);