Skip to content

Commit

Permalink
Fix possible buffer overflow in addMultirowsImg
Browse files Browse the repository at this point in the history
Continuation of 4e46481
  • Loading branch information
bptato committed Aug 5, 2023
1 parent ee66aab commit 9246212
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions anchor.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ addMultirowsImg(Buffer *buf, AnchorList *al)
a->slave = TRUE;
a->image = img;
a->end.pos = pos + ecol - col;
if (pos < 1 || a->end.pos >= l->size)
continue;
for (k = pos; k < a->end.pos; k++)
l->propBuf[k] |= PE_IMAGE;
if (a_href.url) {
Expand Down

0 comments on commit 9246212

Please sign in to comment.