From 9d39abf947d6d1555a72614b8f68ef670a4c2619 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 13 Nov 2006 03:21:13 +0000 Subject: r19683: Guard GUID_from_string from walking off the end. Andrew Bartlett (This used to be commit 1c3e9b27a793971b096192204c54338b5e571521) --- source4/lib/ldb/samba/ldif_handlers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib') 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; -- cgit