summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-13 03:21:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:25:31 -0500
commit9d39abf947d6d1555a72614b8f68ef670a4c2619 (patch)
treec8018851b6293ec28f3ccd7711dfd0625b78e2f0
parent8539fb3aaa15e67a0bfc91785935fdffb9ed5ea3 (diff)
downloadsamba-9d39abf947d6d1555a72614b8f68ef670a4c2619.tar.gz
samba-9d39abf947d6d1555a72614b8f68ef670a4c2619.tar.bz2
samba-9d39abf947d6d1555a72614b8f68ef670a4c2619.zip
r19683: Guard GUID_from_string from walking off the end.
Andrew Bartlett (This used to be commit 1c3e9b27a793971b096192204c54338b5e571521)
-rw-r--r--source4/lib/ldb/samba/ldif_handlers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/samba/ldif_handlers.c b/source4/lib/ldb/samba/ldif_handlers.c
index e96ba348f9..8abfb87238 100644
--- a/source4/lib/ldb/samba/ldif_handlers.c
+++ b/source4/lib/ldb/samba/ldif_handlers.c
@@ -183,6 +183,9 @@ static BOOL ldb_comparision_objectGUID_isString(const struct ldb_val *v)
if (v->length < 33) return False;
+ /* see if the input if null-terninated (safety check for the below) */
+ if (v->data[v->length] != '\0') return False;
+
status = GUID_from_string((const char *)v->data, &guid);
if (!NT_STATUS_IS_OK(status)) {
return False;