From 44ef632c766046e8f738f1f6859dc3913e056087 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 20 Jun 2019 18:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E5=86=85?= =?UTF-8?q?=E5=AD=98=E8=B6=8A=E7=95=8C=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/System.cpp b/server/System.cpp index 93fd90a6..c74c3699 100644 --- a/server/System.cpp +++ b/server/System.cpp @@ -260,7 +260,7 @@ string System::execute(const string &cmd) { } string ret; char buff[1024] = {0}; - while(fgets(buff, sizeof(buff), fPipe)){ + while(fgets(buff, sizeof(buff) - 1, fPipe)){ ret.append(buff); } pclose(fPipe);