Possible printer driver bug

Huw D M Davies h.davies1 at physics.ox.ac.uk
Mon Jul 30 06:38:07 CDT 2001


On Sun, Jul 29, 2001 at 05:31:05PM +0300, Jukka Heinonen wrote:
> Wine compiled from CVS crashes since file "wine/dlls/gdi/driver.c" 
> passes a NULL pointer to function CreateICA. The following
> patch stops crashing, but since I have no idea how Wine
> printer drivers work, this patch might be plain wrong.
> 
> After this patch, Wine no longer crashes, but I haven't
> been able to test whether printing works or not.
> 
> Index: wine/dlls/gdi/driver.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/gdi/driver.c,v
> retrieving revision 1.2
> diff -u -r1.2 driver.c
> --- wine/dlls/gdi/driver.c      2001/07/28 00:18:02     1.2
> +++ wine/dlls/gdi/driver.c      2001/07/29 14:10:18
> @@ -376,7 +376,7 @@
>  
>      if(!DRIVER_GetDriverName( lpszDevice, buf, sizeof(buf) )) return -1;
>  
> -    if (!(hdc = CreateICA( buf, NULL, lpszPort, NULL ))) return -1;
> +    if (!(hdc = CreateICA( buf, lpszDevice, lpszPort, NULL ))) return -1;
>  
>      if ((dc = DC_GetDCPtr( hdc )))
>      {
> 

Looks good.  There's also another one in GDI_CallDeviceCapabilities16
(line 424) that needs the same fix.  Could you fix them both and send the
patch to wine-patches ?

Huw.





More information about the wine-devel mailing list