From ff0f5e40249037c2456e43bf901633097d7ae430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Sun, 14 Nov 2021 10:20:26 +0100 Subject: [PATCH] winspool.drv: Fix incorrect read of enumerated printer count. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was changed from a unsigned int to a pointer in e5d37832ee66d011ba572a9b571e9fb44a7b2b4d and this use was missed, causing prefix creation hang if the allocated printers array is not filled with zeros. Signed-off-by: RĂ©mi Bernon Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/winspool.drv/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 3424c69d196..ac8f0994a1c 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -800,7 +800,7 @@ static BOOL init_unix_printers( void ) if (printer->is_default) default_printer = printer->name; } - if (!default_printer && enum_params.num) default_printer = enum_params.printers[0].name; + if (!default_printer && num) default_printer = enum_params.printers[0].name; if (default_printer) SetDefaultPrinterW( default_printer ); if (ppd_dir)