Skip to content

Commit 9ea887e

Browse files
committed
TerminalFont: fix possible buffer overflow
1 parent 5f3ce50 commit 9ea887e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/terminalfont/terminalfont.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ FF_MAYBE_UNUSED static bool detectKitty(const FFstrbuf* exe, FFTerminalFontResul
8282
if (ffGetTerminalResponse(
8383
"\eP+q6b697474792d71756572792d666f6e745f66616d696c79;6b697474792d71756572792d666f6e745f73697a65\e\\", // kitty-query-font_family;kitty-query-font_size
8484
2,
85-
"\eP1+r%*[^=]=%512[^\e]\e\\\eP1+r%*[^=]=%512[^\e]\e\\", fontHex, sizeHex) == NULL && *fontHex && *sizeHex)
85+
"\eP1+r%*[^=]=%511[^\e]\e\\\eP1+r%*[^=]=%511[^\e]\e\\", fontHex, sizeHex) == NULL && *fontHex && *sizeHex)
8686
{
8787
// decode hex string
8888
for (const char* p = fontHex; p[0] && p[1]; p += 2)

0 commit comments

Comments
 (0)