From 2d95bdc4bfeca681037e98ce925daccaf3ae328a Mon Sep 17 00:00:00 2001 From: Daniel Lawrence Lu Date: Tue, 20 Jun 2023 02:00:03 -0700 Subject: [PATCH] common: fix incorrect comparison in BufferedOutputStream (#1010) --- libs/Common/Filters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Common/Filters.h b/libs/Common/Filters.h index 55218cc59..e84f3547c 100644 --- a/libs/Common/Filters.h +++ b/libs/Common/Filters.h @@ -103,7 +103,7 @@ class BufferedOutputStream : public LayerOutputStream { if (this->s->write(buf, bufSize) == STREAM_ERROR) return STREAM_ERROR; pos = 0; - if (len >= bufSize) { + if (len < bufSize) { if (this->s->write(b, len) == STREAM_ERROR) return STREAM_ERROR; break;