diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-01-18 01:49:35 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-01-18 17:53:50 +0000 |
commit | 1d6bdb6ba00a317700ac734b7862983e23c5a842 (patch) | |
tree | 30be126a41dc4f7eca8b876a04c2262b708dfcb1 /tools/qmltime | |
parent | 2e7b1e0e8e606f1e35d666dd80f512b3c37d2c6a (diff) |
qmltime: Reject 0 iterations
Causes a divide-by-zero. Low risk, but let's fix it anyway.
Coverity-Id: 161333
Change-Id: I7631abdca469a5dd9e2becf32cc9aa4f5cf515dc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmltime')
-rw-r--r-- | tools/qmltime/qmltime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmltime/qmltime.cpp b/tools/qmltime/qmltime.cpp index 4c282dd8f4..b337ccac5c 100644 --- a/tools/qmltime/qmltime.cpp +++ b/tools/qmltime/qmltime.cpp @@ -222,7 +222,7 @@ int main(int argc, char ** argv) QByteArray its(argv[ii]); bool ok = false; iterations = its.toUInt(&ok); - if (!ok) + if (!ok || iterations == 0) usage(argv[0]); } else { usage(argv[0]); |