Ignore stray characters in SIXEL data instead of discarding the image. Regression test included.

This commit is contained in:
Michael Grant
2026-10-14 11:43:18 +02:00
parent 4b06bdd63b
commit 7e4dc561ca
2 changed files with 9 additions and 3 deletions

View File

@@ -482,10 +482,8 @@ sixel_parse(const char *buf, size_t len, u_int p1, u_int p2, u_int cell_w,
si->dx = 0;
break;
default:
if (ch < 0x20)
break;
if (ch < 0x3f || ch > 0x7e)
goto bad;
break;
if (sixel_parse_write(si, ch - 0x3f) != 0) {
log_debug("%s: width limit reached", __func__);
goto bad;