summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/lcp_opt_magic.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-09-27 20:07:32 +0400
committerKozlov Dmitry <dima@server>2010-09-27 20:07:32 +0400
commit0325cc5f07ac992414129b4f47ae4aae017dbd2b (patch)
tree52c6d762dd62b347695aa51ab5cf4944e5f7bd9b /accel-pptpd/ppp/lcp_opt_magic.c
parent59d9616d73973c529b08578f3596acaa081cd8bf (diff)
downloadaccel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.tar.gz
accel-ppp-xebd-0325cc5f07ac992414129b4f47ae4aae017dbd2b.zip
bug fixes
Diffstat (limited to 'accel-pptpd/ppp/lcp_opt_magic.c')
-rw-r--r--accel-pptpd/ppp/lcp_opt_magic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/accel-pptpd/ppp/lcp_opt_magic.c b/accel-pptpd/ppp/lcp_opt_magic.c
index cec40ce..166c85c 100644
--- a/accel-pptpd/ppp/lcp_opt_magic.c
+++ b/accel-pptpd/ppp/lcp_opt_magic.c
@@ -64,6 +64,9 @@ static int magic_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt,
struct magic_option_t *magic_opt=container_of(opt,typeof(*magic_opt),opt);
struct lcp_opt32_t *opt32=(struct lcp_opt32_t*)ptr;
+ if (!ptr)
+ return LCP_OPT_NAK;
+
if (magic_opt->magic==ntohl(opt32->val))
{
log_ppp_error("loop detected");