diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-01-31 09:41:18 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-01-31 12:08:34 +0000 |
commit | 50447bb7a32dcdf5070f769cb9ef26112d2f4c04 (patch) | |
tree | 3cdc3bf07b71e0320f53d4bb862435114296592b /src | |
parent | e352ec4db4e6c6936bb406bb77776e1da89a2e84 (diff) |
Initialize bit_depth
==12==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x6b90ea in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:360:32
Change-Id: Idf04130e645dcf589dfb6260661be18a71b7bdc2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 110ee1670b..808037f434 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -233,7 +233,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal png_uint_32 width; png_uint_32 height; - int bit_depth; + int bit_depth = 0; int color_type = 0; png_bytep trans_alpha = 0; png_color_16p trans_color_p = 0; @@ -678,7 +678,7 @@ QImage::Format QPngHandlerPrivate::readImageFormat() { QImage::Format format = QImage::Format_Invalid; png_uint_32 width, height; - int bit_depth, color_type = 0; + int bit_depth = 0, color_type = 0; png_colorp palette; int num_palette; png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0); |