Module: wine Branch: master Commit: d0ce5a77c60e0a9613f1af03d67d13b89816441b URL: https://gitlab.winehq.org/wine/wine/-/commit/d0ce5a77c60e0a9613f1af03d67d13b...
Author: Alex Henrie alexhenrie24@gmail.com Date: Thu Feb 16 09:15:56 2023 -0700
winspool: Initialize nt_ppd in add_printer_driver.
This prevents a bad free if RtlDosPathNameToNtPathName_U fails.
---
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 61017104ab1..456d5e2ecdf 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -635,7 +635,7 @@ static BOOL add_printer_driver( const WCHAR *name, const WCHAR *ppd_dir ) { WCHAR *ppd = get_ppd_filename( ppd_dir, name ); struct get_ppd_params ppd_params; - UNICODE_STRING nt_ppd; + UNICODE_STRING nt_ppd = { .Buffer = NULL }; DRIVER_INFO_3W di3; unsigned int i; BOOL res = FALSE;