Skip to content

Fix some issues reported by Coverity Scan#846

Merged
mayeut merged 3 commits intouclouvain:masterfrom
stweil:coverity
Sep 21, 2016
Merged

Fix some issues reported by Coverity Scan#846
mayeut merged 3 commits intouclouvain:masterfrom
stweil:coverity

Conversation

@stweil
Copy link
Copy Markdown
Contributor

@stweil stweil commented Sep 21, 2016

Signed-off-by: Stefan Weil sw@weilnetz.de

CID 1190155 (uclouvain#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>
CID 1190154 (uclouvain#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>
This fixes an error reported by Coverity:

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

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@mayeut mayeut added this to the OPJ v2.1.2 milestone Sep 21, 2016
@mayeut
Copy link
Copy Markdown
Collaborator

mayeut commented Sep 21, 2016

@stweil Thanks !
@malaterre, you might want to backport this one to branch-2.1 (mostly for openjpip, the other being test tools).

@mayeut mayeut merged commit 8715ce2 into uclouvain:master Sep 21, 2016
@stweil stweil deleted the coverity branch September 21, 2016 19:42
malaterre pushed a commit that referenced this pull request Sep 22, 2016
* 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>
@detonin detonin added the bug label Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants