[PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

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

 



On Wed, 2018-03-07 at 09:34 +0000, David Woodhouse wrote:
> 
> Maybe we should pass the xmlNode into add_option() not a string? Then
> it's nice and simple. And more xmlnode_get_text() invocations can turn
> into simple xmlnode_is_named()? The above code becomes
> 
> ????????for (xml_node = xml_node->children; xml_node; xml_node=xml_node->next) {
> ????????????????if (!xmlnode_is_named(xml_node, "ip-address"))
> ????????????????????????vpninfo->ip_info.addr = add_option(vpninfo, "ipaddr", xml_node);

There's a problem with that suggestion if xmlNodeGetContent() on the
node returns NULL. Previously, xmlnode_get_text() would fail on that
one, while xmlnode_is_named() would have matched it. Is that a thing
that can actually happen? Do we need to cope gracefully, or merely make
sure we don't crash??
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20180307/b36dda84/attachment.bin>


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux