diff --git a/openvpn.c b/openvpn.c index 1e33c61..10e3f30 100644 --- a/openvpn.c +++ b/openvpn.c @@ -1432,6 +1432,11 @@ OnPassword(connection_t *c, char *msg) param->flags |= (flags & 0x2) ? FLAG_CR_TYPE_CONCAT : FLAG_CR_TYPE_SCRV1; param->flags |= (flags & 0x1) ? FLAG_CR_ECHO : 0; param->str = strdup(chstr + 5); + if (!param->str) + { + WriteStatusLog(c, L"GUI> ", L"Error: Out of memory - ignoring dynamic challenge", false); + return; + } LocalizedDialogBoxParamEx(ID_DLG_AUTH_CHALLENGE, c->hwndStatus, UserAuthDialogFunc, (LPARAM) param); } else if (o.auth_pass_concat_otp)