Re: [PATCH 08/12] virSecurityLabelDefParseXML: Don't use 'virXPathStringLimit'

2021-11-23 Thread Ján Tomko
On a Monday in 2021, Peter Krempa wrote: virXPathStringLimit doesn't give callers a way to differentiate between the queried XPath being empty and the length limit being exceeded. This means that callers are either overwriting the error message or ignoring it altogether. Move the length checks

Re: [PATCH 08/12] virSecurityLabelDefParseXML: Don't use 'virXPathStringLimit'

2021-11-23 Thread Peter Krempa
On Mon, Nov 22, 2021 at 21:01:58 +0100, Tim Wiederhake wrote: > On Mon, 2021-11-22 at 18:12 +0100, Peter Krempa wrote: > > virXPathStringLimit doesn't give callers a way to differentiate > > between > > the queried XPath being empty and the length limit being exceeded. > > > > This means that call

Re: [PATCH 08/12] virSecurityLabelDefParseXML: Don't use 'virXPathStringLimit'

2021-11-22 Thread Tim Wiederhake
On Mon, 2021-11-22 at 18:12 +0100, Peter Krempa wrote: > virXPathStringLimit doesn't give callers a way to differentiate > between > the queried XPath being empty and the length limit being exceeded. > > This means that callers are either overwriting the error message or > ignoring it altogether.

[PATCH 08/12] virSecurityLabelDefParseXML: Don't use 'virXPathStringLimit'

2021-11-22 Thread Peter Krempa
virXPathStringLimit doesn't give callers a way to differentiate between the queried XPath being empty and the length limit being exceeded. This means that callers are either overwriting the error message or ignoring it altogether. Move the length checks into the caller. Signed-off-by: Peter Krem