Skip to content

Commit

Permalink
Merge pull request #1573 from sebras/master
Browse files Browse the repository at this point in the history
opj_jp2_read_header: Check for error after parsing header.
  • Loading branch information
rouault authored Jan 16, 2025
2 parents eb25a5e + f809b80 commit 44119c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/openjp2/jp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ OPJ_BOOL opj_jp2_read_header(opj_stream_private_t *p_stream,
p_image,
p_manager);

if (p_image && *p_image) {
if (ret && p_image && *p_image) {
/* Set Image Color Space */
if (jp2->enumcs == 16) {
(*p_image)->color_space = OPJ_CLRSPC_SRGB;
Expand Down

0 comments on commit 44119c2

Please sign in to comment.