summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-03-10 09:53:36 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-03-10 10:57:53 +0000
commitfb196e88074a8547ef93030ee385227664965106 (patch)
tree11cf2463da49874c45aa0b19226e615ed070e1c6 /tools
parent62e0a98282081911616a8c005464d483a3a480d2 (diff)
QMimeMagicRule: fix UB (misaligned load) in matchNumber<T>()
Found by UBSan: qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const short unsigned int', which requires 2 byte alignment qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const unsigned int', which requires 4 byte alignment Fix by using new qUnalignedLoad<T>() instead of a load through a type-punned pointer and misaligned pointer. Change-Id: I6b876f1ce7e01369fbb25a51263d1ad04be07d52 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions