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 a12fffbe5ced0341c96cbf26a44915ffdedf01ec..f4439f271512c218ad8769c66a50fd5fd69ad67c 100644 |
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp |
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp |
@@ -528,6 +528,9 @@ static void TIFF_PredictLine(FX_LPBYTE dest_buf, int row_size, int BitsPerCompon |
for(int i = 1; i < row_bits; i ++) { |
int col = i % 8; |
int index = i / 8; |
+ if (index > row_size) { |
Tom Sepez
2014/08/27 21:20:35
Don't you want >= ?
Tom Sepez
2014/08/27 21:25:45
Maybe we prune row_bits outside the loop to avoid
Bo Xu
2014/08/27 22:13:18
Good idea.
|
+ break; |
+ } |
int index_pre = (col == 0) ? (index - 1) : index; |
Tom Sepez
2014/08/27 21:25:45
nit: maybe these should move outsize the loop, st
Bo Xu
2014/08/27 22:13:18
Done.
|
int col_pre = (col == 0) ? 8 : col; |
Tom Sepez
2014/08/27 21:35:33
8 seems like a weird value to assign to a variable
|
if( ((dest_buf[index] >> (7 - col)) & 1) ^ ((dest_buf[index_pre] >> (8 - col_pre)) & 1) ) { |
Tom Sepez
2014/08/27 21:35:33
This would need to change if you followed the abov
|