From 8cffab27251dbcbf2c4075df7313e88eeb1d26fd Mon Sep 17 00:00:00 2001 From: "Daniel L. Lu" Date: Mon, 19 Jun 2023 15:25:40 -0700 Subject: [PATCH] fix incorrect comparison in BufferedOutputStream --- 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;