diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-05-19 16:53:34 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-21 01:34:38 +0200 |
commit | 5283a6c87beac5a43f612786fefd6e43f2c70bf6 (patch) | |
tree | 48c1648a29305a3567e51bdd1f98ae4b7a64dfed /src/tools/uic/main.cpp | |
parent | 1b031630ded1fbb9a94642de1d720651a390a03b (diff) |
Disable hash seeding for bootstrapped tools
Any bootstrapped tool is a development tool, by definition. So the
effects of seeding the hash with a random number can cause the same
source input to produce different binary results, which can throw some
caching tools into disarray (like the Open Build System).
There should be minimal fall out from the reduced protection against
DoS. Since those are only development tools, "specially crafted" input
implies the developer is DoS'ing him/herself.
Note: the change to qhash.cpp applies to moc and rcc, which are always
bootstrapped.
Change-Id: I061ab52036e40627c0703f1bf881455cbf848f43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/tools/uic/main.cpp')
-rw-r--r-- | src/tools/uic/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp index cb2bd430ff..12b0ee6737 100644 --- a/src/tools/uic/main.cpp +++ b/src/tools/uic/main.cpp @@ -52,9 +52,12 @@ #include <qcommandlineparser.h> QT_BEGIN_NAMESPACE +extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; int runUic(int argc, char *argv[]) { + qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet + QCoreApplication app(argc, argv); QCoreApplication::setApplicationVersion(QString::fromLatin1(QT_VERSION_STR)); |