From c69fb2ed39346fd5091a4e30606cb5bb866aa432 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 17 Jun 2014 17:14:26 +0400 Subject: auth_mschap,radius: fixed improper passing MS-CHAP-Error, Reply-Message to auth modules Passed strings was not nullterminated --- accel-pppd/auth/auth_mschap_v1.c | 2 ++ accel-pppd/auth/auth_mschap_v2.c | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'accel-pppd/auth') diff --git a/accel-pppd/auth/auth_mschap_v1.c b/accel-pppd/auth/auth_mschap_v1.c index 0dcaffd1..8491e2c1 100644 --- a/accel-pppd/auth/auth_mschap_v1.c +++ b/accel-pppd/auth/auth_mschap_v1.c @@ -323,6 +323,8 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h else ppp_auth_failed(ad->ppp, name); _free(name); + if (mschap_error != conf_msg_failure) + _free(mschap_error); } else { if (!ad->started) { if (ppp_auth_succeeded(ad->ppp, name)) { diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c index 3ee2adc3..d679aca9 100644 --- a/accel-pppd/auth/auth_mschap_v2.c +++ b/accel-pppd/auth/auth_mschap_v2.c @@ -394,6 +394,10 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h else ppp_auth_failed(ad->ppp, name); _free(name); + if (mschap_error != conf_msg_failure) + _free(mschap_error); + if (reply_msg != conf_msg_failure2) + _free(reply_msg); } else { if (!ad->started) { if (ppp_auth_succeeded(ad->ppp, name)) { -- cgit v1.2.3