This strictens the parser to disallow negative values (interpreted as `UINT_MAX + value + 1`) for attribute `latency`. Allowing negative numbers to be interpreted this way makes no sense for this attribute. Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b3ed3a9c5a..942d6f269a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13092,18 +13092,12 @@ static int virDomainAudioPulseAudioParse(virDomainAudioIOPulseAudio *def, xmlNodePtr node) { - g_autofree char *latency = virXMLPropString(node, "latency"); - def->name = virXMLPropString(node, "name"); def->streamName = virXMLPropString(node, "streamName"); - if (latency && - virStrToLong_ui(latency, NULL, 10, - &def->latency) < 0) { - virReportError(VIR_ERR_XML_ERROR, - _("cannot parse 'latency' value '%s'"), latency); + if (virXMLPropUInt(node, "latency", 10, VIR_XML_PROP_NONE, + &def->latency) < 0) return -1; - } return 0; } -- 2.26.3