Skip to content

Commit

Permalink
Fix j2k_validate_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Oct 15, 2015
1 parent 650df81 commit cbaa2d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libopenjpeg/j2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2733,8 +2733,8 @@ static opj_bool j2k_validate_encode(opj_j2k_t *j2k, opj_image_t *image) {

/* PARAMETERS checking */
for (compno=0; compno < image->numcomps; compno++) {
is_valid &= (image->comps[compno].dx > 1 && j2k->image->comps[compno].dx < 255);
is_valid &= (image->comps[compno].dy > 1 && j2k->image->comps[compno].dy < 255);
is_valid &= (image->comps[compno].dx >= 1 && j2k->image->comps[compno].dx <= 255);
is_valid &= (image->comps[compno].dy >= 1 && j2k->image->comps[compno].dy <= 255);
}

return is_valid;
Expand Down

0 comments on commit cbaa2d7

Please sign in to comment.