Re: [Bug+Patch] error in IMAP mailbox encoding

Albrecht Dreß <[email protected]>
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
Am 23.02.19 15:56 schrieb(en) Albrecht Dreß:
> The attached patch replaces the hand-coded conversion by utilising g_convert(), and also fixes the bug.

I noticed only now that the patch contains a redundant assignment in imap_mailbox_to_utf8(), line 168 – doesn't do any harm (and will probably removed by the optimiser), but clutters the code.  Additional fix, on top of the 1st attempt, attached…

Sorry,
Albrecht.

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
fix-imap-utf7-encoding_addition.diff (text/x-patch, 538 B)
diff --git a/libbalsa/imap/util.c b/libbalsa/imap/util.c
index bb29575f9..b2809f223 100644
--- a/libbalsa/imap/util.c
+++ b/libbalsa/imap/util.c
@@ -165,7 +165,6 @@ imap_mailbox_to_utf8(const gchar *mbox)
 				utf7buf = g_malloc0(strlen(next_in) + 1U);
 				utf7buf[0] = '+';					/* RFC 2152 shift character */
 				next_in++;
-				next_utf7 = &utf7buf[1];
 				for (next_utf7 = &utf7buf[1]; (*next_in != '\0') && (*next_in != '-'); next_in++) {
 					if (*next_in == ',') {			/* see RFC 3501, Section 5.1.3 */
 						*next_utf7++ = '/';
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEcCEPemLFTtyGf4zATKlvDmfn2fgFAlxxZSAACgkQTKlvDmfn
2fhRAggAwpJGTHV9hxqrXAEjPgAUrkH8R/IxnFTKdXLawwE/LGKhGfEmo5QDXrlo
Q1zB7qjuzs2u8qcwBSBMP27oSBDy9987xAfIObwaoHi97tsy31KqBy3T55zO2o3c
/3VhqnOPrmXgsTlj+uD5pP+6oiBwUDr70EX0kwP2YDR/ZUaIi1gc4j3aDmaPyi/E
6lXR9pAM3oSeGyEozFlGzXtuq/3V05gRVJTt0JrvXHLeoEoQ+fKhMqfVtfjWCNAQ
ZnlvvBCWRktpWjMdTf5hSCEi98BZxvBLBy1BBJnkyt+g0j+F4LtbQcMBKdL+BNOI
8Cgbbf8fu6PSj6LA4dZExKlWJh6MGA==
=9vY9
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.