From 0c6668246cde84071996dd402db1f16738113398 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 7 Feb 2017 17:35:02 +0100 Subject: plist: Fix assert() to allow 16 or 8 byte integer sizes (16 bytes = unsigned integer) Credit to Wang Junjie (#90) Credit to OSS-Fuzz --- src/plist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plist.c b/src/plist.c index 3314378..f62e6be 100644 --- a/src/plist.c +++ b/src/plist.c @@ -767,7 +767,7 @@ PLIST_API void plist_get_uint_val(plist_t node, uint64_t * val) uint64_t length = 0; if (PLIST_UINT == type) plist_get_type_and_value(node, &type, (void *) val, &length); - assert(length == sizeof(uint64_t)); + assert(length == sizeof(uint64_t) || length == 16); } PLIST_API void plist_get_uid_val(plist_t node, uint64_t * val) -- cgit v1.1-32-gdbae