shell32: fix infinite loop in SHGetPathFromIDListW

Vitaliy Margolen wine-devel at
Sat Jun 25 08:36:41 CDT 2005

Thank you. This patch does fix the infinite loop bug.

Vitaliy Margolen

Saturday, June 25, 2005, 5:14:27, Michael Jung wrote:

> Hi,

> With a seemingly unrelated change in his local tree Vigaliy Margolen triggered
> an infinite loop in SHGetPathFromIDList (which was introduced by one of my 
> patches):

> SHGetPathFromIDList (pidl.c:1256) calls SHBindToParent, which calls 
Desktop->>BindToObject (pidl.c:1315), which calls SHELL32_BindToChild 
> (shfldr_desktop.c:348), which binds to MyComputer (shlfolder.c:289) and then 
calls MyComputer->>BindToObject (shlfolder.c:314), which calls 
> SHELL32_BindToChild (shfldr_mycomp.c:346), which calls 
> SHELL32_GetCustomFolderAttribute (shlfolder.c:299), which calls 
> SHGetPathFromIDList (shlfolder.c:91). Phew.

> Since the path is already known in SHELL32_BindToChild, we can break the loop 
> easily.

> I don't understand, why we don't see a stack overflow with wine cvs, but the 
> size of a +shell log shrinks 90% with this patch applied compared to cvs. So 
> we do have the loop, but it is terminated somehow before the stack overflows.

> Changelog:
> 	Fix a lurking infinite loop in SHGetPathFromIDList. 

> Bye,

More information about the wine-devel mailing list