From de952852acaa87d148ffe7406a7ddf57a10813b3 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 27 Dec 2018 15:13:32 -0800 Subject: [PATCH] asprintf() returns -1 on error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes the bugs reported on the mailing list and Ubuntu tracker… - http://lists.infradead.org/pipermail/openconnect-devel/2018-December/005164.html "Failed to obtain WebVPN cookie introduced by f08767d9644029bd3ac0e83bf160a7bf03a5c8de" - https://bugs.launchpad.net/bugs/1809839 "[Bug 1809839] [NEW] Daily build 2667 broken for protocol=GP" --- auth-globalprotect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth-globalprotect.c b/auth-globalprotect.c index 399369d7..8cc543b5 100644 --- a/auth-globalprotect.c +++ b/auth-globalprotect.c @@ -458,7 +458,7 @@ static int gpst_login(struct openconnect_info *vpninfo, int portal, struct login /* submit prelogin request to get form */ orig_path = vpninfo->urlpath; if (asprintf(&vpninfo->urlpath, "%s/prelogin.esp?tmp=tmp&clientVer=4100&clientos=%s", - portal ? "global-protect" : "ssl-vpn", clientos)) { + portal ? "global-protect" : "ssl-vpn", clientos) < 0) { result = -ENOMEM; goto out; } -- 2.50.1