diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-09-22 13:12:36 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-09-22 13:12:36 +0400 |
commit | fb1f7723afe46d696ba62597909066fea42bfaec (patch) | |
tree | c8558ba2abe0899173b85d6724eadcbbb24c0b71 /accel-pppd/auth | |
parent | 62e89248160d3592c2d754fcaa15e37586a5b091 (diff) | |
download | accel-ppp-fb1f7723afe46d696ba62597909066fea42bfaec.tar.gz accel-ppp-fb1f7723afe46d696ba62597909066fea42bfaec.zip |
fixed compilation warnings
Diffstat (limited to 'accel-pppd/auth')
-rw-r--r-- | accel-pppd/auth/auth_pap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/auth/auth_pap.c b/accel-pppd/auth/auth_pap.c index 9aab377..909b115 100644 --- a/accel-pppd/auth/auth_pap.c +++ b/accel-pppd/auth/auth_pap.c @@ -312,7 +312,7 @@ static void pap_recv(struct ppp_handler_t *h) struct pap_auth_data *d = container_of(h, typeof(*d), h); struct pap_hdr *hdr = (struct pap_hdr *)d->ppp->buf; - if (d->ppp->buf_size < sizeof(*hdr) || ntohs(hdr->len) < HDR_LEN || ntohs(hdr->len) < d->ppp->buf_size - 2) { + if (d->ppp->buf_size < sizeof(*hdr) || ntohs(hdr->len) < HDR_LEN || ntohs(hdr->len) > d->ppp->buf_size - 2) { log_ppp_warn("PAP: short packet received\n"); return; } |