Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't attempt to parse empty response from server
I couldn't trigger this until I hacked up stuff elsewhere to return
artificial failures, but still...

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Mar 4, 2013
1 parent ed16cfc commit 7a4dcd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions auth.c
Expand Up @@ -493,6 +493,12 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response, struct
*formp = NULL;
}

if (!response) {
vpn_progress(vpninfo, PRG_TRACE,
_("Empty response from server\n"));
return -EINVAL;
}

form = calloc(1, sizeof(*form));
if (!form)
return -ENOMEM;
Expand Down

0 comments on commit 7a4dcd9

Please sign in to comment.