fix buffer overflow on all emphasis flags set (#4498)

This commit is contained in:
Dominic Pöschko
2025-07-20 10:43:33 -07:00
committed by GitHub
parent 553ec11ec0
commit 35dcc58263
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -430,7 +430,7 @@ template <typename Char> struct ansi_color_escape {
private:
static constexpr size_t num_emphases = 8;
Char buffer[7u + 3u * num_emphases + 1u];
Char buffer[7u + 4u * num_emphases + 1u];
static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
char delimiter) noexcept {