winspool: (fixes bug #3589) Result of EnumPrinterDrivers points to unallocated memory

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

winspool: (fixes bug #3589) Result of EnumPrinterDrivers points to unallocated memory

Detlef Riekenberg

The bug is in GetStringFromReg when the ValueName is present in the
Registry, but the Value is empty:
No space is reserved for the terminating zero.

The internal Function is used to fill strings in PRINTER_INFO_* and
DRIVER_INFO_* from the Registry.

EnumPrinters is not affected, because AddPrinter has set a Value for the
relevant Strings.


Changelog:
 - Reserve space for the terminating zero, when the String-Value
   in the Registry is empty (fixes bug #3589)


--
By By ...
      ... Detlef



unterminated_strings.diff (736 bytes) Download Attachment