From 9ceb65a664e7fa69be72db43b2ddae75a5b078e1 Mon Sep 17 00:00:00 2001 From: xiaocheng Date: Thu, 2 Feb 2017 12:10:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=AE=8F=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF=20magic=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ikcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ikcp.c b/ikcp.c index ef11690..7ae9921 100644 --- a/ikcp.c +++ b/ikcp.c @@ -749,7 +749,7 @@ int ikcp_input(ikcpcb *kcp, const char *data, long size) ikcp_log(kcp, IKCP_LOG_INPUT, "[RI] %d bytes", size); } - if (data == NULL || size < 24) return -1; + if (data == NULL || size < IKCP_OVERHEAD) return -1; while (1) { IUINT32 ts, sn, len, una, conv;