Skip to content

Commit

Permalink
Issue 23433 in oss-fuzz: Heap-buffer-overflow in findNextBorderPixel()
Browse files Browse the repository at this point in the history
* Check pix boundary when looking for the next pixel.
  • Loading branch information
DanBloomberg committed Jun 15, 2020
1 parent 20e1a04 commit 8d6e175
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ccbord.c
Expand Up @@ -1080,6 +1080,8 @@ l_uint32 *line;
pos = (qpos + i) % 8;
npx = px + xpostab[pos];
npy = py + ypostab[pos];
if (npx < 0 || npx >= w || npy < 0 || npy >= h)
continue;
line = data + npy * wpl;
val = GET_DATA_BIT(line, npx);
if (val) {
Expand Down

0 comments on commit 8d6e175

Please sign in to comment.