Skip to content

Commit ee17851

Browse files
committed
Fix use after free
This could cause an immediate crash or incorrect values might be read subsequently resulting in incorrect computations. In QtFlagPropertyManager::uninitializeProperty(QtProperty *): A pointer to freed memory is dereferenced, used as a function argument, or otherwise used (CWE-416) Coverity-Id: 22622 Change-Id: I24fc9d6f7c1c516ddcadaaba2ba7cdaed7c7f807 Reviewed-by: Friedemann Kleint <[email protected]>
1 parent a8dda66 commit ee17851

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qtpropertybrowser/src/qtpropertymanager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5355,8 +5355,8 @@ void QtFlagPropertyManager::setFlagNames(QtProperty *property, const QStringList
53555355
while (itProp.hasNext()) {
53565356
QtProperty *prop = itProp.next();
53575357
if (prop) {
5358-
delete prop;
53595358
d_ptr->m_flagToProperty.remove(prop);
5359+
delete prop;
53605360
}
53615361
}
53625362
d_ptr->m_propertyToFlags[property].clear();
@@ -5396,8 +5396,8 @@ void QtFlagPropertyManager::uninitializeProperty(QtProperty *property)
53965396
while (itProp.hasNext()) {
53975397
QtProperty *prop = itProp.next();
53985398
if (prop) {
5399-
delete prop;
54005399
d_ptr->m_flagToProperty.remove(prop);
5400+
delete prop;
54015401
}
54025402
}
54035403
d_ptr->m_propertyToFlags.remove(property);

0 commit comments

Comments
 (0)