diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index bac06c6d1..12fd4a7c8 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -262,10 +262,10 @@ static void detectFromWindowsTerminal(const FFstrbuf* terminalExe, FFTerminalFon static bool queryKittyTerm(const char* query, FFstrbuf* res) { // https://github.com/fastfetch-cli/fastfetch/discussions/1030#discussioncomment-9845233 - char buffer[64] = ""; + char buffer[256] = ""; if (ffGetTerminalResponse( query, // kitty-query-font_family;kitty-query-font_size - "\eP1+r%*[^=]=%64[^\e]\e\\", buffer) == NULL && *buffer) + "\eP1+r%*[^=]=%255[^\e]\e\\", buffer) == NULL) { // decode hex string for (const char* p = buffer; p[0] && p[1]; p += 2) diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index dfb4fbbd9..230b515c1 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -507,11 +507,11 @@ static bool getTerminalVersionZed(FFstrbuf* exe, FFstrbuf* version) #ifndef _WIN32 static bool getTerminalVersionKitty(FFstrbuf* exe, FFstrbuf* version) { - char versionHex[64] = ""; + char versionHex[64]; // https://github.com/fastfetch-cli/fastfetch/discussions/1030#discussioncomment-9845233 if (ffGetTerminalResponse( "\eP+q6b697474792d71756572792d76657273696f6e\e\\", // kitty-query-version - "\eP1+r%*[^=]=%64[^\e]\e\\\\", versionHex) == NULL && *versionHex) + "\eP1+r%*[^=]=%63[^\e]\e\\\\", versionHex) == NULL) { // decode hex string for (const char* p = versionHex; p[0] && p[1]; p += 2)