Fix potential bug in case of ill-formed serialized container.

This commit is contained in:
Patrick Pelissier committed 2017-09-16 13:30:09 +02:00
1 parent 2e564088b0
commit 95f467f4be
5 files changed
+15 -10

No files matched your search

+3 -2
View File
@@ -504,9 +504,10 @@
DICTI_CONTRACT(name, dict); \
M_C(name, _clean)(dict); \
int c = fgetc(file); \
if (c != '{') return false; \
if (M_UNLIKELY (c != '{')) return false; \
c = fgetc(file); \
if (c == '}') return true; \
if (M_UNLIKELY (c == '}')) return true; \
if (M_UNLIKELY (c == EOF)) return true; \
ungetc(c, file); \
key_type key; \
M_IF(isSet)( ,value_type value); \