From: David Woodhouse Date: Tue, 4 May 2021 11:11:17 +0000 (+0100) Subject: Refuse to handle forms without ->auth_id X-Git-Tag: v8.20~238 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0b47ea1882346fdedfcd8a315f51aeb39e13459e;p=users%2Fdwmw2%2Fopenconnect.git Refuse to handle forms without ->auth_id GUI authentication dialogs will really want this for saving responses. And saved_form_field() will crash if it's NULL too. Signed-off-by: David Woodhouse --- diff --git a/main.c b/main.c index c43f8731..722f4d9c 100644 --- a/main.c +++ b/main.c @@ -2494,6 +2494,9 @@ static int process_auth_form_cb(void *_vpninfo, struct oc_form_opt *opt; int empty = 1; + if (!form->auth_id) + return -EINVAL; + if (form->banner && verbose > PRG_ERR) fprintf(stderr, "%s\n", form->banner);