Skip to content

Commit

Permalink
check size, fix issue #83
Browse files Browse the repository at this point in the history
  • Loading branch information
knok committed Aug 29, 2019
1 parent 2df6437 commit 9c013f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fromsixel.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,10 @@ sixel_decode_raw_impl(
if (context->repeat_count == 0) {
context->repeat_count = 1;
}
if (context->repeat_count > 0xffff) { /* check too huge number */
status = SIXEL_BAD_INPUT;
goto end;
}
context->state = PS_DECSIXEL;
context->param = 0;
context->nparams = 0;
Expand Down

0 comments on commit 9c013f2

Please sign in to comment.