henry-1.67commit

This commit is contained in:
2024-11-02 12:27:43 +08:00
parent f2fc600fea
commit a7fdf479a5
7 changed files with 37 additions and 27 deletions

View File

@@ -200,5 +200,23 @@
"vul_info": [],
"fix_size": 256,
"patch_info": "but `recv` is called with a size of 0x400 (1024) bytes, which can lead to a buffer overflow if more than 256 bytes are received."
},
{
"file_name": "recv_extract.c",
"vul_info": [],
"fix_size": 255,
"patch_info": "you should limit the size of data received to match the buffer size. The buffer `buffer` is declared with a size of 256 bytes. Therefore, the `recv` call should be limited to 255 bytes to leave space for the null terminator."
},
{
"file_name": "recv_extract.c",
"vul_info": [],
"fix_size": 256,
"patch_info": "you should limit the size of data received to the size of the buffer. In the `echo_handler` function, the buffer is defined as `char buffer[256];`, which means it can safely hold up to 256 bytes."
},
{
"file_name": "recv_extract.c",
"vul_info": [],
"fix_size": 255,
"patch_info": "you should limit the size of the data received by the `recv` function to the size of the buffer. The buffer is declared as `char buffer[256];`, so the maximum safe size for `recv` should be 255 bytes to leave room for the null terminator."
}
]