From d5b771afdd88432175d6f30409209e1d38020e50 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 22 Sep 2016 11:53:09 +0200 Subject: [PATCH] - fixed: Both array serializers need the bounds check. --- src/serializer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/serializer.h b/src/serializer.h index 17d8c970e..8b05cf9ec 100644 --- a/src/serializer.h +++ b/src/serializer.h @@ -134,6 +134,11 @@ public: } if (BeginArray(key)) { + if (isReading()) + { + int max = ArraySize(); + if (max < count) count = max; + } for (int i = 0; i < count; i++) { Serialize(*this, nullptr, obj[i], def ? &def[i] : nullptr);