From: Thorsten Maerz Date: Wed, 1 Jan 2003 17:47:30 +0000 (+0000) Subject: inhibit endless loop if msg references itself X-Git-Tag: rel_0_8_9~128 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=20c2feaafeaaf799fa11a1f0b725aa55f2dcf0f6 inhibit endless loop if msg references itself --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 91aaaf9aa..d1dd24585 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -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 diff --git a/configure.in b/configure.in index 6e520b948..8840621f4 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/procmsg.c b/src/procmsg.c index 96c7c6c6b..6c7369b40 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -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 {