Fix some issues reported by Coverity Scan (#846)
authorStefan Weil <sw@weilnetz.de>
Wed, 21 Sep 2016 19:15:25 +0000 (21:15 +0200)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Thu, 22 Sep 2016 06:16:13 +0000 (08:16 +0200)
commit7a5fb35b8d08686b57937d7584414c0594ef8b98
tree150c5b5c693435063c227db36bb5059fb4731a1c
parent39f9934a70f5f01ddb7adc70801e981efb146f05
Fix some issues reported by Coverity Scan (#846)

* test_tile_decoder: Fix potential buffer overflow (coverity)

CID 1190155 (#1 of 1): Unbounded source buffer (STRING_SIZE)

Using a pointer instead of buffer of fixed size avoids the limit
for the length of the input file name.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
* test_tile_encoder: Fix potential buffer overflow (coverity)

CID 1190154 (#1 of 1): Unbounded source buffer (STRING_SIZE)

Using a pointer instead of buffer of fixed size avoids the limit
for the length of the output file name. This implies that the length
can exceed 255, so the data type for variable len had to be fixed, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
* openjpip: Initialize data before returning it

This fixes an error reported by Coverity:

CID 1190143 (#1 of 1): Uninitialized scalar variable (UNINIT)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/lib/openjpip/j2kheader_manager.c
tests/test_tile_decoder.c
tests/test_tile_encoder.c