热更新一个内存泄漏漏洞
This commit is contained in:
+2
-1
@@ -146,8 +146,9 @@ int main(int argn,char** argc){
|
|||||||
pthread_create(&receive_t,NULL,receive_f,&receive_i);
|
pthread_create(&receive_t,NULL,receive_f,&receive_i);
|
||||||
char* buffer = malloc(BUFFER);
|
char* buffer = malloc(BUFFER);
|
||||||
char* ioput = malloc(BUFFER);
|
char* ioput = malloc(BUFFER);
|
||||||
|
char input[BUFFER]={0};
|
||||||
while(1){
|
while(1){
|
||||||
char* input = malloc(BUFFER);
|
memset(input,0,BUFFER);
|
||||||
scanf("%s",input);
|
scanf("%s",input);
|
||||||
switch(command(input)){
|
switch(command(input)){
|
||||||
case receive:
|
case receive:
|
||||||
|
|||||||
Reference in New Issue
Block a user