<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Florian,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>You didn't attach your patch !</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>If you did attach it, the mailing list app removed the attachment, so copy/paste in the body and resend!<br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Florin Boariu
 <florin.ml@rootshell.ro><br> <b><span style="font-weight: bold;">To:</span></b> offlineimap-project@lists.alioth.debian.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, March 29, 2013 4:09 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> BUG: git-current crashing with "string index out of range"<br> </font> </div> <br>
Hi everyone,<br><br>first off thanks for the great effort in making offlineimap such a nice<br>piece of software :-)<br><br>Then I'd like to report a bug: offlineimap in current debian wheezy<br>(6.3.4) seems to crash at selected messages from my (rather large, ~7000<br>messages) mailbox with a strange error in folder/IMAP.py:<br><br>>  data = data[0][1].replace("\r\n", "\n")<br>>   IndexError: string index out of range<br><br>The problem persists with the (current?) git version, apparently<br>6.5.5-rc2. Simple "print"-based debugging indicates that reason for the<br>problem is probably a malformed message or a dropped connection of my IMAP<br>server. In any case, it happens reproducibly at several messages, always<br>at the _same_ messages, and at apparently this is because the data<br>returned by imapobj.uid() in IMAPFolder.getmessage() looks like:<br><br>>   [')']<br><br>instead of what the code expects:<br><br>> [('...',
 '...')]<br><br>The attached patch seems to... let's say "work around" :-) the problem by<br>checking for this specific case and resetting the data variable to a sane<br>value. I don't know the offlineimap internals, so I'd expect that what I'm<br>doing is a veeery bad and ugly fix, but it keeps things rolling for my<br>particular case.<br><br>If I can help you further, let me know.<br><br>I'm not on the mailing list, so I'd appreciate if people answering to this<br>email would be kind enough to include me in CC.<br><br>Thanks again & have a nice holiday,<br><br>Florin.<br><br><br><br><br><br>_______________________________________________<br>OfflineIMAP-project mailing list<br><a ymailto="mailto:OfflineIMAP-project@lists.alioth.debian.org" href="mailto:OfflineIMAP-project@lists.alioth.debian.org">OfflineIMAP-project@lists.alioth.debian.org</a><br>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project<br><br>OfflineIMAP homepage:
 http://software.complete.org/offlineimap<br><br><br> </div> </div>  </div></body></html>