diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 39a474999..dbcc07dc5 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -107,7 +107,7 @@ static BOOL printer_write_setting(const char* path, prn_conf_t type, const void* const char* name = filemap[type]; char* abs = GetCombinedPath(path, name); - if (!abs) + if (!abs || (length > INT32_MAX)) return FALSE; file = CreateFileA(abs, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);