From 0b47ea1882346fdedfcd8a315f51aeb39e13459e Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 4 May 2021 12:11:17 +0100 Subject: [PATCH] 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 --- main.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.50.1