From dc6efb5b374c21744fe356efcfd823abd0af2dd3 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 19 Apr 2018 20:32:48 -0400 Subject: [PATCH] Use uint64_t to detect out of range graphics command id parse_graphics_code() uses an unsigned long to detect if the id is "> UINT32_MAX", however sizeof(long) == sizeof(void *) on Linux systems. So this condition will be impossible on any 32-bit system. --- kitty/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/parser.c b/kitty/parser.c index 0980a904c..e2cbffb50 100644 --- a/kitty/parser.c +++ b/kitty/parser.c @@ -816,7 +816,7 @@ parse_graphics_code(Screen *screen, PyObject UNUSED *dump_callback) { enum KEYS key = 'a'; static GraphicsCommand g; unsigned int i, code; - unsigned long lcode; + uint64_t lcode; bool is_negative; memset(&g, 0, sizeof(g)); static uint8_t payload[4096];