qt5base-lts/src
David Faure 7322c65ba7 QMimeMagicRule: fix off by one in the number of bytes checked
Since the loop says p <= e, no +1 should be added to e.

Testcase:

The magic for application/x-gameboy-rom says
<match type="byte" value="0x0" mask="0x80" offset="323"/>
and this code was checking both byte 323 and byte 324, finding a match
at pos 324, returning application/x-gameboy-rom erroneously.

Given the magic for application/x-gameboy-color-rom:
<match type="byte" value="0x80" mask="0x80" offset="323"/>
the expected result for game-boy-color-test.gbc is application/x-gameboy-color-rom

Not yet detected by tst_qmimedatabase which is based on shared-mime-info 1.0,
will be covered by the upgrade to 1.8.

Change-Id: I2396cb1ccfb26db5a24d5551fef493cc0b98a247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 08:44:32 +00:00
..
3rdparty List ANGLE contributions after another 2016-11-23 09:35:53 +00:00
android Optimize QtActivity's onCreate a little bit 2016-12-25 04:14:58 +00:00
angle use helper libs via QMAKE_USE 2016-10-15 18:45:10 +00:00
concurrent QtConcurrent: Add missing override 2016-11-29 20:37:54 +00:00
corelib QMimeMagicRule: fix off by one in the number of bytes checked 2016-12-27 08:44:32 +00:00
dbus Fix using 0 as null pointer 2016-12-06 15:32:26 +00:00
gui Silence maybe_uninitialized warning with gcc -Og 2016-12-21 22:08:01 +00:00
network Make the bearer QFactoryLoader a member variable, not a static 2016-12-17 04:11:13 +00:00
opengl Add missing override into Qt modules 2016-12-01 12:07:13 +00:00
openglextensions Also release winmain, qopenglextensions under commercial licenses 2016-11-18 16:19:56 +00:00
platformheaders Silence platformheaders syncqt warning about qt_egl_p.h 2016-12-16 04:07:22 +00:00
platformsupport Merge remote-tracking branch 'origin/5.8.0' into 5.8 2016-12-16 09:45:16 +01:00
plugins platform plugins: Remove unused former overriders 2016-12-22 23:02:45 +00:00
printsupport Add missing override into Qt modules 2016-12-01 12:07:13 +00:00
sql MySQL: Make sure we clean the libraries from mysql_config 2016-12-14 13:29:57 +00:00
testlib QTestLib: Add timestamp to mouse click events 2016-12-16 19:18:07 +00:00
tools Silence implicit-fallthough warnings 2016-12-19 09:35:57 +00:00
widgets Silence maybe_uninitialized warning with gcc -Og 2016-12-21 22:08:01 +00:00
winmain Also release winmain, qopenglextensions under commercial licenses 2016-11-18 16:19:56 +00:00
xml QXmlAttributes: mark as shared-come-qt6 2016-10-04 06:25:54 +00:00
src.pro Fix qtlibpng being built despite system libpng being found 2016-12-15 05:19:56 +00:00