Skip to content

Commit

Permalink
fix OOB access, fixes #6279, fixes #6352
Browse files Browse the repository at this point in the history
  • Loading branch information
heckflosse committed Sep 3, 2021
1 parent 9b26424 commit ce4c315
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtengine/dcraw.cc
Expand Up @@ -4397,6 +4397,12 @@ void CLASS crop_masked_pixels()
}
}
} else {
if (height + top_margin > raw_height) {
top_margin = raw_height - height;
}
if (width + left_margin > raw_width) {
left_margin = raw_width - width;
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
Expand Down

0 comments on commit ce4c315

Please sign in to comment.