[PATCH] winspool.drv: Fix incorrect read of enumerated printer count.

Alexandre Julliard julliard at winehq.org
Sun Nov 14 03:44:48 CST 2021


Rémi Bernon <rbernon at codeweavers.com> writes:

> This was changed from a unsigned int to a pointer in
> e5d37832ee66d011ba572a9b571e9fb44a7b2b4d and this use was missed,
> causing prefix creation hang if the allocated printers array is not
> filled with zeros.
>
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
>
> I'm also not sure to see why this was changed to a pointer, imho it's
> a little more ugly than the integer, which would simply have to be
> mapped on output for wow64 too and would have required less changes
> overall? But maybe there was a specific reason?

In general, I think it's better to use parameter structs the same way as
standard function parameters. It avoids having to remember to unmap them
in the wow64 thunks, and it should make it possible later on to optimize
them using standard parameter passing.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list