ref: b1aec91912043da574719dd5ee69fab63ff67f9f
parent: 7defaad9d2b48ef88faee9be7e0a1ed9e37ece53
author: ISSOtm <[email protected]>
date: Thu Apr 14 17:23:23 EDT 2022
Assert that row size is not null Silences some static analysis warning
--- a/src/gfx/process.cpp
+++ b/src/gfx/process.cpp
@@ -308,7 +308,9 @@
// Now that metadata has been read, we can process the image data
- std::vector<png_byte> row(png_get_rowbytes(png, info));
+ size_t nbRowBytes = png_get_rowbytes(png, info);
+ assert(nbRowBytes != 0);
+ std::vector<png_byte> row(nbRowBytes);
if (interlaceType == PNG_INTERLACE_NONE) {
for (png_uint_32 y = 0; y < height; ++y) {