From 46ba7a161ff35c8da87e49247a4ce2b7ac4af14b Mon Sep 17 00:00:00 2001 From: Dmitry Tkachenko Date: Fri, 15 Jan 2021 23:52:19 +0300 Subject: [PATCH] Fix array deserialization --- include/redis-cpp/resp/deserialization.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/redis-cpp/resp/deserialization.h b/include/redis-cpp/resp/deserialization.h index 37fba26..7619ea6 100644 --- a/include/redis-cpp/resp/deserialization.h +++ b/include/redis-cpp/resp/deserialization.h @@ -219,7 +219,10 @@ class array final std::getline(stream, string); auto count = std::stoll(string); if (count < 0) + { is_null_ = true; + return; + } if (count < 1) return; items_.reserve(static_cast(count));