From cbf28577ef49b6f5b5e45ae2e74143969cbd9327 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 30 Mar 2015 11:59:41 +0200 Subject: [PATCH] Force length of prefix path to be calculated at runtime Prevent compilers from calculating strlen at compile time by using a volatile pointer. This corrupted paths if the installation path is patched for the binary SDK installer. Task-number: QTBUG-45307 Change-Id: I624b0409e8b27299475a88eb1cbf03ffef9589c6 Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qlibraryinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 5db2e94602..2912e68580 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -447,7 +447,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) if (!QLibraryInfoPrivate::configuration()) #endif { - const char *path = 0; + const char * volatile path = 0; if (loc == PrefixPath) { path = #ifdef QT_BUILD_QMAKE