Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.8, 6.4.2
-
None
-
os: OpenWrt 22.03.0 // mipsel_24kc // ramips/mt7621 // Xiaomi R3G
cross compiled on Linux debian 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
Description
QString::fromLatin1 produces corrupted output in the case source address is misaligned by uneven number. Every 8th character gets 'randomly' replaced. Actually only first occurrence is random and the replacing char comes from the string being converted at offset of -11
The culprit is:
qtbase/src/corelib/text/qstring_mips_dsp_asm.S:326
#if defined(__mips_dspr2)
prepend t1, t2, 8
#else
sll t4, t4, 24
srl t1, t1, 8
or t1, t1, t4
#endif
The correct is:
sll t4, t2, 24