diff options
| author | 2017-02-07 17:35:02 +0100 | |
|---|---|---|
| committer | 2017-02-07 17:35:02 +0100 | |
| commit | 0c6668246cde84071996dd402db1f16738113398 (patch) | |
| tree | 143fe8588b38467e9488dcb051878c67c50f3a14 | |
| parent | 8368f3d66e963af2040a7cc750a041226364926f (diff) | |
| download | libplist-0c6668246cde84071996dd402db1f16738113398.tar.gz libplist-0c6668246cde84071996dd402db1f16738113398.tar.bz2 | |
plist: Fix assert() to allow 16 or 8 byte integer sizes (16 bytes = unsigned integer)
Credit to Wang Junjie <zhunkibatu@gmail.com> (#90)
Credit to OSS-Fuzz
| -rw-r--r-- | src/plist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 767 | uint64_t length = 0; | 767 | uint64_t length = 0; |
| 768 | if (PLIST_UINT == type) | 768 | if (PLIST_UINT == type) |
| 769 | plist_get_type_and_value(node, &type, (void *) val, &length); | 769 | plist_get_type_and_value(node, &type, (void *) val, &length); |
| 770 | assert(length == sizeof(uint64_t)); | 770 | assert(length == sizeof(uint64_t) || length == 16); |
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | PLIST_API void plist_get_uid_val(plist_t node, uint64_t * val) | 773 | PLIST_API void plist_get_uid_val(plist_t node, uint64_t * val) |
