Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.8.0
-
None
-
Ubuntu 10.4
-
ecdbaf99a11b8c42632e6cb9786d68464aacc7ec
Description
The QContiguousCache constructor takes the (int capacity) as a parameter and constructs the object with the given capacity. Hence it is expected that the capacity can not be negative. However negative values are permitted.
The steps to reproduce:
Create an object of QContiguousCache<int> c(-1);
The actual result:
the compilation passes, no warning messages regarding the negative capacity is generated
The expected result:
The warning or an error should be generated
Attachments
For Gerrit Dashboard: QTBUG-19700 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
228241,2 | QContiguousCache: add assertion to avoid negative capacity | dev | qt/qtbase | Status: MERGED | +2 | 0 |