From 2f62cd2383ee1c2f4b01445a8f47f862e3239512 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Sat, 15 Mar 2014 18:30:58 +0800 Subject: [PATCH] modify recv namelen array --- .../frameworks/runtime-src/Classes/Runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 5fc3dc5d2f..b0cb758961 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -363,7 +363,7 @@ bool CreateDir(const char *sPathName) bool FileServer::recv_file(int fd) { char buffer[1024]={0}; - char namelen[4]={0}; + char namelen[5]={0}; if (recv(fd, namelen, 4,0)<=0) { return false; }