Index: core/src/fxcodec/codec/fx_codec_flate.cpp |
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp |
index e8878e453524d58e28c991315a9189c3582d8cdb..37aecf106d2e8bde56c874ab25abde5c6a0316b4 100644 |
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp |
@@ -400,6 +400,8 @@ static FX_BOOL PNG_Predictor(uint8_t*& data_buf, |
if (row_size <= 0) |
return FALSE; |
const int row_count = (data_size + row_size) / (row_size + 1); |
+ if (row_count <= 0) |
Tom Sepez
2015/10/02 16:44:25
Yeah, ok, but this gets better using only unsigned
Lei Zhang
2015/10/02 17:29:31
Acknowledged.
|
+ return FALSE; |
const int last_row_size = data_size % (row_size + 1); |
uint8_t* dest_buf = FX_Alloc2D(uint8_t, row_size, row_count); |
int byte_cnt = 0; |