From 71a6040f8a59a77535130337b8c7b1eb5fd2672f Mon Sep 17 00:00:00 2001 From: yangwei Date: Sun, 23 Jul 2023 23:13:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=5F=5Fmjl=5Fgtp=5Fcalc=5Fgtp?= =?UTF-8?q?=5Fhdr=5Flen):=20=E4=BF=AE=E5=A4=8D=E9=95=BF=E5=BA=A6=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E8=B6=85=E8=BF=87=E5=8C=85=E9=95=BF=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MESA_jump_layer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MESA_jump_layer.cpp b/src/MESA_jump_layer.cpp index f91f1c0..c24a4f0 100644 --- a/src/MESA_jump_layer.cpp +++ b/src/MESA_jump_layer.cpp @@ -211,7 +211,11 @@ static int __mjl_gtp_calc_gtp_hdr_len(const struct gtp_hdr *gtph) return -1; } - if(gtph->len > 1460) + if(gtph->msg_type != 0xFF){ + return -1; + } + + if(ntohs(gtph->len) > 1460 || ntohs(gtph->len) < 40) { return -1; }