Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some issues reported by Coverity Scan #846

Merged
merged 3 commits into from
Sep 21, 2016
Merged

Conversation

stweil
Copy link
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
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.

None yet

3 participants