https://bugs.kde.org/show_bug.cgi?id=382941
--- Comment #14 from Matthias Schwarzott <z...@gentoo.org> --- (In reply to Leslie Zhai from comment #12) > Git commit 16576d6fd33fd4fd81f66904d29a4478a91a561f by Leslie Zhai. > Committed on 14/08/2017 at 03:35. > Pushed by lesliezhai into branch 'master'. > > Revert from{2,4}Byte. > > Hi Thomas: > Please help me! I have no idea why num_wr_speed_des (numDesc) might > be wrong? and how to make it correct if bigger than (32 - 8) / 4, > and where the *magic numbers* about 32 and 8 come from. > > Testcase by Matthias Schwarzott! > > CCMAIL: scdbac...@gmx.net > > M +11 -8 libk3bdevice/k3bdevice.cpp > M +2 -2 libk3bdevice/k3bdeviceglobals.cpp > M +19 -5 tests/k3bdeviceglobalstest.cpp > > https://commits.kde.org/k3b/16576d6fd33fd4fd81f66904d29a4478a91a561f This testcase should be deleted (for from2Byte and from4Byte): + const unsigned char buf0[] = { '\0' }; + QCOMPARE(K3b::Device::from4Byte(buf0), (quint32)0); It reads data after the array, so will observe undefined behaviour. -- You are receiving this mail because: You are watching all bug changes.