Bug 308746

Summary: wchar_t / QString::fromWCharArray bug
Product: [Unmaintained] Necessitas Reporter: Martin Koller <kollix>
Component: Android Qt4Assignee: BogDan Vatra <bogdan>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: alpha4   
Target Milestone: Unspecified   
Platform: Compiled Sources   
OS: Android 2.x   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Koller 2012-10-21 10:51:31 UTC
the Qt-Android port needs some fix in
QString::fromWCharArray() and toWCharArray() methods, because
on Android wchar_t == char (for the simplicity of bionic), which makes the checks
in the mentioned methods wrong.
E.g. sizeof(wchar_t) == sizeof(QChar)
which is never true on Android, and leads to Qt thinking it deals with 4-byte wchar_t arrays.
I'd say this also will lead to crashing apps as this methods will access illegal memory.

Reproducible: Always
Comment 1 Martin Koller 2016-11-06 09:58:14 UTC
seems this was only true until Android 2.3