From d8e2305eae473abe198282e86936d7ed2ef2c069 Mon Sep 17 00:00:00 2001 From: sakitsuki_asahi Date: Wed, 11 Mar 2026 03:21:04 +0900 Subject: [PATCH] =?UTF-8?q?=E7=83=AD=E6=9B=B4=E6=96=B0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/c/RSA-Chat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c/RSA-Chat.c b/src/c/RSA-Chat.c index 86afa71..bf3eaee 100644 --- a/src/c/RSA-Chat.c +++ b/src/c/RSA-Chat.c @@ -146,8 +146,9 @@ int main(int argn,char** argc){ pthread_create(&receive_t,NULL,receive_f,&receive_i); char* buffer = malloc(BUFFER); char* ioput = malloc(BUFFER); + char input[BUFFER]={0}; while(1){ - char* input = malloc(BUFFER); + memset(input,0,BUFFER); scanf("%s",input); switch(command(input)){ case receive: