]> 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, 15 Aug 2017 14:39:17 +0000 (15:39 +0100)
commitd56165d9303bd899f96b31eb86c081c66ee28dbb
tree2c749d8416348d68592bcdb0ce2289a27044af4c
parent72417537432653cb8f7821ca3e1dfeb8a570b3c4
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