From d569c6392c98a5f3037814add1f03a0dc149a86e Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 24 Apr 2022 13:19:18 +0200 Subject: [PATCH] Avoid initializing the PNG row It gets overwritten right after, and uncovers an error in the interlaced read --- src/gfx/process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx/process.cpp b/src/gfx/process.cpp index b40c04a3..c7c90e5a 100644 --- a/src/gfx/process.cpp +++ b/src/gfx/process.cpp @@ -310,7 +310,7 @@ public: size_t nbRowBytes = png_get_rowbytes(png, info); assert(nbRowBytes != 0); - std::vector row(nbRowBytes); + DefaultInitVec row(nbRowBytes); if (interlaceType == PNG_INTERLACE_NONE) { for (png_uint_32 y = 0; y < height; ++y) {