From 3303fe2fd3d952eab7a2da1aa936cdab2c0cbfae Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Thu, 15 Jul 2021 17:58:58 +0300 Subject: [PATCH] Update ZstdInflatingReadBuffer.cpp --- src/IO/ZstdInflatingReadBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IO/ZstdInflatingReadBuffer.cpp b/src/IO/ZstdInflatingReadBuffer.cpp index 7644050c4a5..6c03ea420a9 100644 --- a/src/IO/ZstdInflatingReadBuffer.cpp +++ b/src/IO/ZstdInflatingReadBuffer.cpp @@ -58,6 +58,9 @@ bool ZstdInflatingReadBuffer::nextImpl() } else if (output.pos == 0) { + /// It is possible, that input buffer is not at eof yet, but nothing was decompressed in current iteration. + /// But there are cases, when such behaviour is not allowed - i.e. if input buffer is not eof, then + /// it has to be guaranteed that working_buffer is not empty. So if it is empty, continue. return nextImpl(); }