summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-06-20 09:13:25 +0000
committerBrian Somers <brian@FreeBSD.org>2000-06-20 09:13:25 +0000
commitbee32c7928ef8ae01bb78a77851d657888c77aac (patch)
tree788037a28730e143e33790d02cde639c54e1d9d6
parenteb2671134a65a3b4909a5e577d0939ab390518ee (diff)
Notes
-rw-r--r--usr.sbin/ppp/lqr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c
index 3e9f0f672f52..dad0e461cfbe 100644
--- a/usr.sbin/ppp/lqr.c
+++ b/usr.sbin/ppp/lqr.c
@@ -85,8 +85,9 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf *bp)
struct lcp *lcp = fsm2lcp(fp);
struct echolqr lqr;
- if (m_length(bp) == sizeof lqr) {
- bp = mbuf_Read(bp, &lqr, sizeof lqr);
+ if (m_length(bp) >= sizeof lqr) {
+ m_freem(mbuf_Read(bp, &lqr, sizeof lqr));
+ bp = NULL;
lqr.magic = ntohl(lqr.magic);
lqr.signature = ntohl(lqr.signature);
lqr.sequence = ntohl(lqr.sequence);