forked from osmocom/wireshark
Qt: Avoid infinite recursion in ExtcapArgument::loadValues
If configuring a extcap "value" sentence with {value=} then loadValues() must not run in a infinite recursion trying to find it's children. Change-Id: Ic2577b31d9312e8f6a099c4fe7c0672e801dbc89 Reviewed-on: https://code.wireshark.org/review/19192 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
6a4226e2bf
commit
00223bc5b9
|
@ -591,7 +591,7 @@ ExtcapValueList ExtcapArgument::loadValues(QString parent)
|
|||
if (v == NULL || v->display == NULL || v->call == NULL )
|
||||
break;
|
||||
|
||||
QString valParent(v->parent == 0 ? "" : QString().fromUtf8(v->parent));
|
||||
QString valParent = QString().fromUtf8(v->parent);
|
||||
|
||||
if ( parent.compare(valParent) == 0 )
|
||||
{
|
||||
|
@ -602,7 +602,9 @@ ExtcapValueList ExtcapArgument::loadValues(QString parent)
|
|||
ExtcapValue element = ExtcapValue(display, call,
|
||||
v->enabled == (gboolean)TRUE, v->is_default == (gboolean)TRUE);
|
||||
|
||||
element.setChildren(this->loadValues(call));
|
||||
if (!call.isEmpty())
|
||||
element.setChildren(this->loadValues(call));
|
||||
|
||||
elements.append(element);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue