[vte/wip/sixels: 57/82] sixel: Fix out-of-bounds write caused by parser arithmetic error
- From: Hans Petter Jansson <hansp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/sixels: 57/82] sixel: Fix out-of-bounds write caused by parser arithmetic error
- Date: Fri, 26 Jun 2020 00:47:54 +0000 (UTC)
commit 7de725a30ca995dd33f65ae2d6ce9ed0809ea2a1
Author: Hans Petter Jansson <hpj cl no>
Date: Sun Jun 14 14:51:18 2020 +0200
sixel: Fix out-of-bounds write caused by parser arithmetic error
src/sixel.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/sixel.cc b/src/sixel.cc
index 035c8752..2ef26901 100644
--- a/src/sixel.cc
+++ b/src/sixel.cc
@@ -548,7 +548,7 @@ sixel_parser_parse(sixel_state_t *st, unsigned char *p, size_t len)
if (st->pos_x + st->repeat_count > image->width)
st->repeat_count = image->width - st->pos_x;
- if (st->repeat_count > 0 && st->pos_y - 5 < image->height) {
+ if (st->repeat_count > 0 && st->pos_y + 5 < image->height) {
bits = *p - '?';
if (bits != 0) {
sixel_vertical_mask = 0x01;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]