Bug in dlls/comctl32/comctl32undoc.c

Felix Nawothnig felix.nawothnig at t-online.de
Fri Jul 1 19:59:22 CDT 2005

Sascha Cunz wrote:
> In lines 1944 and 1977 of dlls/comctl32/comctl32undoc.c the value "0x7FFF" is 
> used to check for the boundary of a 32 bit integer. However, there should be 
> used MAX_INT instead.

I somehow doubt that this function will ever encounter an INT greater 
than MAX_INT... :)

Anyway, I agree that the current behaviour looks at least suspicious.
It was implemented by Dimi Paun in 2002 

However, it seems it was or is just hiding another bug - I did some 
testing on Win95, Win98 and Win2k3 and I can't reproduce that behaviour 
- lists with >0x8000 elements seem to work just fine.

And since those functions are fairly generic and documented for several 
years now it's quite possible that third-party apps use them for arrays 
with more than 0x8000 elements...

> By the way: Looking at current MSDN, DPA and DSA looks rather documented than 
> "undoc" :-)

Right (they were undocumented for a long time though).

I'm working on it.


More information about the wine-devel mailing list