summaryrefslogtreecommitdiff
path: root/accel-pppd/auth/auth_mschap_v2.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-17 18:08:11 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-17 18:08:11 +0300
commitc783f297faa2453daca7189182a17f913e003ccc (patch)
tree0527171103dbe568658ea21262e1027b7023bf9a /accel-pppd/auth/auth_mschap_v2.c
parent56762d9574d05bff9709c856f9f466c51156f549 (diff)
downloadaccel-ppp-c783f297faa2453daca7189182a17f913e003ccc.tar.gz
accel-ppp-c783f297faa2453daca7189182a17f913e003ccc.zip
memory usage optimization
Diffstat (limited to 'accel-pppd/auth/auth_mschap_v2.c')
-rw-r--r--accel-pppd/auth/auth_mschap_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c
index 61dd017f..644f70b2 100644
--- a/accel-pppd/auth/auth_mschap_v2.c
+++ b/accel-pppd/auth/auth_mschap_v2.c
@@ -609,9 +609,9 @@ static struct ppp_auth_handler_t chap=
static void chap_recv(struct ppp_handler_t *h)
{
struct chap_auth_data_t *d = container_of(h, typeof(*d), h);
- struct chap_hdr_t *hdr = (struct chap_hdr_t *)d->ppp->chan_buf;
+ struct chap_hdr_t *hdr = (struct chap_hdr_t *)d->ppp->buf;
- if (d->ppp->chan_buf_size < sizeof(*hdr) || ntohs(hdr->len) < HDR_LEN || ntohs(hdr->len) < d->ppp->chan_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("mschap-v2: short packet received\n");
return;
}