commit 1e7a75095b82b43c60de55890d6728f68e3e9e0e
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Wed Nov 20 09:08:26 2024 +0100

    fix crash when resuming message propagation with MaxMessages
    
    the problem is triggered by the source-side message disappearing
    after a transaction to propagate it was started and then interrupted.
    
    it seems tempting to centralize the null-check, but some of the other
    branches are taken in situations where the relevant messages from the
    source store have not been requested.
    
    no autotest, as our test suite does not support injecting changes before
    resuming.
    
    amends 0089f49.

 src/sync.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sync.c b/src/sync.c
index 1937d65..8cf3c65 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1229,6 +1229,8 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int 
recent_msgs, void *aux
                                        // but we may be pulling in the real 
ones.
                                        nflags = (srec->pflags | 
srec->aflags[xt]) & ~srec->dflags[xt];
                                } else {
+                                       if (!srec->msg[xt^1])
+                                               continue;
                                        nflags = srec->msg[xt^1]->flags;
                                }
                        }


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to