Allow attributes to have only two parameters, from Tim Culverhouse.

pull/3740/head
Nicholas Marriott 2023-11-01 10:37:41 +00:00
parent b777780720
commit a5545dbc9f
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@ sixel_parse_attributes(struct sixel_image *si, const char *cp, const char *end)
if (endptr == last || *endptr != ';')
return (last);
strtoul(endptr + 1, &endptr, 10);
if (endptr == last || *endptr != ';') {
if (endptr == last)
return (last);
if (*endptr != ';') {
log_debug("%s: missing ;", __func__);
return (NULL);
}