winspool.drv: return maximum possible size of the buffer when no buffer is specified

Alexandre Julliard julliard at winehq.org
Wed Feb 23 12:43:49 CST 2011


Vitaly Perov <vitperov at etersoft.ru> writes:

> @@ -7247,7 +7247,7 @@ static BOOL get_job_info_2(job_t *job, JOB_INFO_2W *ji2, LPBYTE buf, DWORD cbBuf
>          else
>          {
>              /* align DEVMODE to a DWORD boundary */
> -            shift= (4 - ( (DWORD_PTR) ptr & 3)) & 3;
> +            shift= ptr ? (4 - ( (DWORD_PTR) ptr & 3)) & 3 : 3;

It should most likely align from the start of the data, not from the
pointer value.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list