diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-11-13 03:21:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:25:31 -0500 |
commit | 9d39abf947d6d1555a72614b8f68ef670a4c2619 (patch) | |
tree | c8018851b6293ec28f3ccd7711dfd0625b78e2f0 /source4/lib/ldb | |
parent | 8539fb3aaa15e67a0bfc91785935fdffb9ed5ea3 (diff) | |
download | samba-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)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/samba/ldif_handlers.c | 3 |
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; |