diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2010-11-24 07:00:20 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-11-24 07:00:20 (GMT) |
commit | fe8276e812c5fdc690715d7e36a6b6d70cba7d33 (patch) | |
tree | f899ea57702fdb78e2a57d4107d84651c65a3957 /configure | |
parent | d0f74ae9712b2225c12c95891357c5f93c30996c (diff) | |
download | Qt-fe8276e812c5fdc690715d7e36a6b6d70cba7d33.zip Qt-fe8276e812c5fdc690715d7e36a6b6d70cba7d33.tar.gz Qt-fe8276e812c5fdc690715d7e36a6b6d70cba7d33.tar.bz2 |
Prevent compilers optimizing eval timebomb code out of existence.
The variable that holds the eval license key is a placeholder that is
patched during package installation. Unfortunately, for a non-final
package build, the placeholder is filled with nulls at compile-time and
a clever compiler will optimize away most of the eval timebomb code due
to a check in the eval code for the first character of the license key
being null.
This commit makes the variable that holds the license key volatile, to
convince compilers that they cannot make assumptions about the contents
of the variable when optimizing.
Task-number: QT-3848
Acked-by: Thiago Macieira
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4520,7 +4520,7 @@ if [ -n "$EVALKEY" ]; then rm -f "$outpath/src/corelib/global/qconfig_eval.cpp" cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF /* Evaluation license key */ -static const char qt_eval_key_data [512 + 12] = "$EVALKEY"; +static const volatile char qt_eval_key_data [512 + 12] = "$EVALKEY"; EOF chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp" fi |