mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-09 15:18:06 -05:00
Harvey Kwok observes that EnumPrinters() can sometimes fail to fill
in its output parameters. Hence, we initialise them before calling it. [originally from svn r7729]
This commit is contained in:
parent
1854dcd388
commit
9acc508c4e
@ -21,7 +21,7 @@ struct printer_job_tag {
|
||||
static char *printer_add_enum(int param, DWORD level, char *buffer,
|
||||
int offset, int *nprinters_ptr)
|
||||
{
|
||||
DWORD needed, nprinters;
|
||||
DWORD needed = 0, nprinters = 0;
|
||||
|
||||
buffer = sresize(buffer, offset+512, char);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user