path: root/examples/json/savegame
diff options
authorMarc Mutz <>2014-10-16 10:39:44 +0200
committerKai Koehne <>2014-10-17 14:56:07 +0200
commit45485d9eb47d3129b8a74c2e9d854c07673161cd (patch)
tree25920a12522c37d65586d96a2d43c944737ab59d /examples/json/savegame
parentdb069e7f3009075937a772e780df40c63a871999 (diff)
Fix undefined behavior in QLoggingRegistry::defaultCategoryFilter()
Report by asan: READ of size 2 at 0x00000041dd40 thread T0 #0 0x2af097b84da6 in QLoggingRegistry::defaultCategoryFilter(QLoggingCategory*) (lib/ #1 0x2af097b8387b in QLoggingRegistry::registerCategory(QLoggingCategory*, QtMsgType) (lib/ #2 0x4067f7 in tst_QLogging::QLoggingCategory_categoryName() tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp:238 <snip> 0x00000041dd41 is located 0 bytes to the right of global variable '*.LC115' defined in 'tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp' (0x41dd40) of size 1 '*.LC115' is ascii string '' At face value, memcmp("", "qt", 2) should not return 0, but since the code invokes undefined behavior, the compiler can do whatever it wants, including returning 0 here, further proving the fact that there are *no* benign cases of undefined behavior. Change-Id: I0c38622c47d1dcea450ea549370be1673b47b18d Reviewed-by: Kai Koehne <> Reviewed-by: Olivier Goffart <>
Diffstat (limited to 'examples/json/savegame')
0 files changed, 0 insertions, 0 deletions