Bug 308746 - wchar_t / QString::fromWCharArray bug
Summary: wchar_t / QString::fromWCharArray bug
Status: RESOLVED NOT A BUG
Alias: None
Product: Necessitas
Classification: Unmaintained
Component: Android Qt4 (show other bugs)
Version: alpha4
Platform: Compiled Sources Android 2.x
: NOR normal
Target Milestone: Unspecified
Assignee: BogDan Vatra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-21 10:51 UTC by Martin Koller
Modified: 2016-11-06 09:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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