Package: isync
Version: 1.1.0-1
Severity: normal
Tags: upstream patch

I get a segmentation fault each time I push a message into an IMAP
folder that is empty on the server. I use the version currently in
Debian Sid.

The attached patch was provided by upstream, see
http://sourceforge.net/mailarchive/message.php?msg_id=31944863 and the
follow ups.

Regards,
Tino

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11.6-05335-g77e0e97 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages isync depends on:
ii  libc6        2.17-97
ii  libdb5.3     5.3.28-3
ii  libssl1.0.0  1.0.1f-1

isync recommends no packages.

Versions of packages isync suggests:
ii  mutt  1.5.21-6.4

-- no debconf information
Description: Fix crash with empty maildirs on server
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 isync (1.1.0-1) unstable; urgency=low
 .
   * New upstream release (Closes: #674403)
     - Fix overlapping memcpy (Closes: #650373)
     - Fix segfault while syncing mailboxes (Closes: #411120)
     - Fix segfault when invoked with arguments without configuration
       (Closes: #727239)
   * Bump debhelper compat level, update Build-Depends
   * Switch to short-form dh rules, remove useless files
   * Switch to 3.0 (quilt) source format
   * Remove empty patches/ directory
   * Drop local source modifications
   * Update short/long descriptions
   * Add 01_fix-manpages.patch to fix manpage errors and typos
   * Add Homepage field
   * Update copyright file to Copyright-Format 1.0
   * Add Vcs-* fields
   * Add 02_fix-duplicate-changelog.patch to avoid duplicate changelog install
   * Add myself to Uploaders
   * Bump Standards-Version to 3.9.5 (no changes needed)
   * Use dh-autoreconf instead of autotools-dev
Author: Alessandro Ghedini <gh...@debian.org>
Bug-Debian: http://bugs.debian.org/411120
Bug-Debian: http://bugs.debian.org/650373
Bug-Debian: http://bugs.debian.org/674403
Bug-Debian: http://bugs.debian.org/727239

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- isync-1.1.0.orig/src/drv_imap.c
+++ isync-1.1.0/src/drv_imap.c
@@ -1817,6 +1817,7 @@ imap_select( store_t *gctx, int create,
 
 	free_generic_messages( gctx->msgs );
 	gctx->msgs = 0;
+	ctx->msgapp = &gctx->msgs;
 
 	if (prepare_box( &buf, ctx ) < 0) {
 		cb( DRV_BOX_BAD, aux );
@@ -1851,7 +1852,6 @@ imap_load( store_t *gctx, int minuid, in
 	} else {
 		struct imap_cmd_refcounted_state *sts = imap_refcounted_new_state( cb, aux );
 
-		ctx->msgapp = &ctx->gen.msgs;
 		sort_ints( excs, nexcs );
 		for (i = 0; i < nexcs; ) {
 			for (bl = 0; i < nexcs && bl < 960; i++) {

Reply via email to