diff options
| author | Brian Somers <brian@FreeBSD.org> | 2000-06-20 09:13:25 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 2000-06-20 09:13:25 +0000 |
| commit | bee32c7928ef8ae01bb78a77851d657888c77aac (patch) | |
| tree | 788037a28730e143e33790d02cde639c54e1d9d6 | |
| parent | eb2671134a65a3b4909a5e577d0939ab390518ee (diff) | |
Notes
| -rw-r--r-- | usr.sbin/ppp/lqr.c | 5 |
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); |
