From dafe0eb3d8fd9bf9487149e9b98170f17f1e046f Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Mon, 20 Jan 2014 14:33:47 +0100 Subject: l2tp: reset conf_secret if secret removed from accel-ppp.conf The "reload" command frees the variable pointed to by conf_secret in case the "secret" option gets removed from accel-ppp.conf. In such a case, conf_secret must be reset to NULL to avoid dereferencing the old pointer. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'accel-pppd/ctrl/l2tp') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 531fab23..ee28598c 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -3976,6 +3976,9 @@ static void load_config(void) if (opt) { conf_secret = opt; conf_secret_len = strlen(opt); + } else { + conf_secret = NULL; + conf_secret_len = 0; } opt = conf_get_opt("l2tp", "dir300_quirk"); -- cgit v1.2.3