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.
This commit is contained in:
James McCoy 2018-04-19 20:32:48 -04:00
parent 8cecb22481
commit dc6efb5b37
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -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];