]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Clean up gpst parse_portal_xml() a little
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 15 Aug 2017 14:34:29 +0000 (15:34 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Feb 2018 15:27:03 +0000 (16:27 +0100)
commite5ce6591ed27e157b935b396906f450d14e14b31
treee763a2b41628810f41c9e203254b7b40aaae4027
parent3915e761409f01e8524a4abb1a6b754b96b16a40
Clean up gpst parse_portal_xml() a little

There was a potential crash if building up the XML in 'buf' didn't
work, because buf->data could be NULL yet we still passed it back
to vpninfo->write_new_config(). So check with buf_error() first.

We can't use a 'static' form because in theory this can be invoked
twice simultaneously for different VPNs, in the same process (and it
isn't even *impossible* the way kde-plasma-nm handled authentication).

Add a FIXME for the fact that we aren't escaping characters which need
it in the XML we build up.

Some other cosmetics, like using calloc() as $DEITY intended instead
of duing the multiplication ourselves.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
auth-globalprotect.c