auth.c:717:14: warning: Access to field 'auth_id' results in a dereference of a null pointer (loaded from variable 'form') [core.NullDereference]
717 | if (!strcmp(form->auth_id, "success"))
| ^~~~~~~~~~~~~
Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
int ret;
struct oc_vpn_option *opt, *next;
+ if (!form) {
+ vpn_progress(vpninfo, PRG_DEBUG,
+ "The authentication form is NULL\n");
+ return -EPERM;
+ }
+
if (!strcmp(form->auth_id, "success"))
return OC_FORM_RESULT_LOGGEDIN;