diff options
Diffstat (limited to 'accel-pptpd/auth/auth_mschap_v1.c')
-rw-r--r-- | accel-pptpd/auth/auth_mschap_v1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pptpd/auth/auth_mschap_v1.c b/accel-pptpd/auth/auth_mschap_v1.c index bf7c212..bc54ed4 100644 --- a/accel-pptpd/auth/auth_mschap_v1.c +++ b/accel-pptpd/auth/auth_mschap_v1.c @@ -235,6 +235,12 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h } name = strndup(msg->name,ntohs(msg->hdr.len)-sizeof(*msg)+2); + if (!name) { + log_emerg("mschap-v2: out of memory\n"); + auth_failed(ad->ppp); + return; + } + r = pwdb_check(ad->ppp, name, PPP_CHAP, MSCHAP_V1, ad->id, ad->val, VALUE_SIZE, msg->lm_hash, msg->nt_hash, msg->flags); if (r == PWDB_NO_IMPL) r = chap_check_response(ad, msg, name); |