Re: [xml] Strange results of xpath element search using string-value



On 02/10/2017 19:58, Daniel Veillard wrote:
    hum ... XPath computes the string value correctly. there is something
going on there.

The bug is in xmlXPathNodeValHash. `string` must be reset to NULL in the default case of this switch statement:

    https://git.gnome.org/browse/libxml2/tree/xpath.c#n6412

The bug can only be triggered if there are multiple descendant text nodes and the first one only contains a single character. The handling of comment and PI nodes in the switch statement also looks fishy.

I'll commit a fix after the 2.9.6 release.

Nick





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]