[PATCH] wininet: NULL terminate url string passed to InternetCrackUrlW from InternetCrackUrlA.txt (try 3)

Francois Gouget fgouget at free.fr
Sun Oct 14 05:29:57 CDT 2007

On Sat, 13 Oct 2007, Nigel Liang wrote:

> Hi,
> InternectCrackUrlW calls strchrW which assumes a NULL-terminated string. Will
> crash without NULL termination if you upload/download for long period of time.

The MSDN has this to say about InternetCrackUrlW():

      Size of the lpszUrl string, in TCHARs, or zero if lpszUrl is an 
      ASCIIZ string.

So if InternetCrackUrlW() assumes that lpwszUrl is zero-terminated then 
it is buggy. So the fix belong in InternetCrackUrlW(), not in 

Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
        It really galls me that most of the computer power in the world
                          is wasted on screen savers.
                     Chris Caldwell from the GIMPS project

More information about the wine-devel mailing list