inhibit endless loop if msg references itself
authorThorsten Maerz <torte@netztorte.de>
Wed, 1 Jan 2003 17:47:30 +0000 (17:47 +0000)
committerThorsten Maerz <torte@netztorte.de>
Wed, 1 Jan 2003 17:47:30 +0000 (17:47 +0000)
ChangeLog.claws
configure.in
src/procmsg.c

index 91aaaf9..d1dd245 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-01 [thorsten]  0.8.8claws34
+
+       * src/procmsg.c
+               inhibit endless loop if msg references itself
+               (closes Bug [ 660477 ] Infinite loop in parent flag search)
+
 2003-01-01 [christoph] 0.8.8claws33
 
        * src/mainwindow.c
index 6e520b9..8840621 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws33
+EXTRA_VERSION=claws34
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 96c7c6c..6c7369b 100644 (file)
@@ -1611,7 +1611,14 @@ gboolean procmsg_msg_has_flagged_parent(MsgInfo *info, MsgPermFlags perm_flags)
                        procmsg_msginfo_free(tmp);
                        return TRUE;
                } else if (tmp != NULL) {
-                       gboolean result = procmsg_msg_has_flagged_parent(tmp, perm_flags);
+                       gboolean result;
+                       if (tmp->msgnum == info->msgnum) {
+                               debug_print("LOOP: message %s%c%d references itself\n",
+                                       folder_item_get_path(info->folder), 
+                                       G_DIR_SEPARATOR, info->msgnum);
+                               result = FALSE;
+                       } else
+                               result = procmsg_msg_has_flagged_parent(tmp, perm_flags);
                        procmsg_msginfo_free(tmp);
                        return result;
                } else {