1
0
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:
Simon Tatham 2007-09-21 18:04:08 +00:00
parent 1854dcd388
commit 9acc508c4e

View File

@ -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);