[PATCH 0/1] MR4796: winspool.drv: Don't use pointer to out of scope local variable in add_printer_driver (Coverity)
From: Fabian Maurer <dark.shadow4(a)web.de> --- dlls/winspool.drv/info.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index c1c3b8bf629..45521809f15 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -636,7 +636,7 @@ static BOOL add_printer_driver( const WCHAR *name, const WCHAR *ppd_dir ) DRIVER_INFO_3W di3; unsigned int i; BOOL res = FALSE; - WCHAR raw[] = L"RAW", driver_nt[] = L"wineps.drv"; + WCHAR raw[] = L"RAW", driver_nt[] = L"wineps.drv", driver_9x[] = L"wineps16.drv"; if (!ppd) return FALSE; if (!RtlDosPathNameToNtPathName_U( ppd, &nt_ppd, NULL, NULL )) goto end; @@ -661,7 +661,6 @@ static BOOL add_printer_driver( const WCHAR *name, const WCHAR *ppd_dir ) di3.pEnvironment = (WCHAR *)all_printenv[i]->envname; if (all_printenv[i]->driverversion == 0) { - WCHAR driver_9x[] = L"wineps16.drv"; /* We use wineps16.drv as driver for 16 bit */ di3.pDriverPath = driver_9x; di3.pConfigFile = driver_9x; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4796
This merge request was closed by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4796
participants (3)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Huw Davies (@huw)