summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gatchat/ppp_ipcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gatchat/ppp_ipcp.c b/gatchat/ppp_ipcp.c
index a1eacdfc..0b3c3817 100644
--- a/gatchat/ppp_ipcp.c
+++ b/gatchat/ppp_ipcp.c
@@ -281,7 +281,7 @@ static enum rcr_result ipcp_rcr(struct pppcp_data *pppcp,
return RCR_ACCEPT;
/* Reject all options */
- *new_len = packet->length - sizeof(*packet);
+ *new_len = ntohs(packet->length) - sizeof(*packet);
*new_options = g_memdup(packet->data, *new_len);
return RCR_REJECT;