Check for \0 after skipping # not before in format_expand1, from ossfuzz.

This commit is contained in:
nicm
2026-04-02 08:37:14 +00:00
parent cbb49e8c84
commit 8b51abef08
2 changed files with 6 additions and 5 deletions

View File

@@ -5444,7 +5444,7 @@ format_expand1(struct format_expand_state *es, const char *fmt)
buf[off++] = *fmt++;
continue;
}
if (*fmt++ == '\0')
if (*++fmt == '\0')
break;
ch = (u_char)*fmt++;