summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2018-03-04 02:29:46 +0500
committerVladislav Grishenko <themiron@mail.ru>2018-03-04 02:41:47 +0500
commit939e952452dd856a574a1d78c15181a93a593996 (patch)
tree3e6b12fab35b12cda2be553faec05755a598d4da /accel-pppd/ctrl/l2tp/l2tp.c
parent5ccf2f0409c18e216c4da5c7cce5e9fcf14ebf54 (diff)
downloadaccel-ppp-xebd-939e952452dd856a574a1d78c15181a93a593996.tar.gz
accel-ppp-xebd-939e952452dd856a574a1d78c15181a93a593996.zip
fix possible null pointer dereferences
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 55881b8..cbb9de6 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -3119,7 +3119,7 @@ static int rescode_get_data(const struct l2tp_attr_t *result_attr,
return 2;
*err_msg = _malloc(msglen + 1);
- if (err_msg) {
+ if (*err_msg) {
memcpy(*err_msg, resavp->error_msg, msglen);
(*err_msg)[msglen] = '\0';
}