Bug 3584

Summary: After 3.13.1, characters in some Japanese codec are never correctly converted to internal ones
Product: Claws Mail (GTK 2) Reporter: honda
Component: OtherAssignee: users
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.13.1   
Hardware: PC   
OS: Linux   

Description honda 2015-12-21 16:21:37 UTC
The newly introduced code fragment in conv_jistoeuc() of codeconv.c

 while (*in != '\0' && (out - outbuf) > outlen - 3) {

is clearly wrong, which should be

 while (*in != '\0' && (out - outbuf) < outlen - 3) {

Becuase of this errata, conv_jistoeuc() never work after 3.13.1. 

Sincerely yours
Comment 1 Michael Schwendt 2015-12-22 12:13:24 UTC
Just spotted that dubious change too for CVE-2015-8614:

The change to conv_jistoeuc() disables the loop, because (out-outbuf) will be zero and hence the while-condition will never be true.
Comment 2 users 2015-12-22 12:18:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2015-12-22 12:18:03.062201248 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=94ce85fa2fd139d7d814216e69fc870deb6953c8
Merge: bc01547 e3ffcb4
Author: Colin Leroy <colin@colino.net>
Date:   Tue Dec 22 12:18:02 2015 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=e3ffcb455e0376053451ce968e6c71ef37708222
Author: Paul <paul@claws-mail.org>
Date:   Tue Dec 22 11:17:02 2015 +0000

    fix bug 3584, 'After 3.13.1, characters in some Japanese codec are never correctly converted to internal ones'
    
    Thanks to honda@math.sci.hokudai.ac.jp
Comment 3 Paul 2015-12-22 12:18:32 UTC
Thank you! Now fixed in GIT.