msi: dont get caught in loops on parent progids

Aric Stewart aric at codeweavers.com
Mon Jun 6 08:24:37 CDT 2005


Project 2003 has a progid that refers to a parent that refers to itself 
as a parent.  Fix this loop.
Note there is still a potential for an infinite loop in this code if 
progid1 --parent--> progid2 --parent--> progid1
but i have never seen this. so I hope it never exists.
-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.134
diff -u -r1.134 action.c
--- dlls/msi/action.c	4 Jun 2005 09:35:22 -0000	1.134
+++ dlls/msi/action.c	6 Jun 2005 13:18:51 -0000
@@ -4565,7 +4507,8 @@
         package->progids[index].ParentIndex != index)
     {
         int pindex = package->progids[index].ParentIndex;
-        while (package->progids[pindex].ParentIndex>= 0)
+        while (package->progids[pindex].ParentIndex>= 0 && 
+               package->progids[pindex].ParentIndex != pindex)
             pindex = package->progids[pindex].ParentIndex;
 
         FIXME("BAD BAD need to determing if we are really the CurVer\n");



More information about the wine-patches mailing list