mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virSecurityLabelDefParseXML: Don't use virXMLPropStringLimit
The function produces an error which is ignored in this code path. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f3a8f26339
commit
01ab6513bd
@ -7804,8 +7804,9 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
|
||||
g_autofree char *relabel = NULL;
|
||||
g_autoptr(virSecurityLabelDef) seclabel = NULL;
|
||||
|
||||
model = virXMLPropStringLimit(ctxt->node, "model",
|
||||
VIR_SECURITY_MODEL_BUFLEN - 1);
|
||||
if ((model = virXMLPropString(ctxt->node, "model")) &&
|
||||
strlen(model) >= VIR_SECURITY_MODEL_BUFLEN - 1)
|
||||
g_clear_pointer(&model, g_free);
|
||||
|
||||
if (!(seclabel = virSecurityLabelDefNew(model)))
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user