Open kobi3028 opened 3 years ago
How can I solve this problem?
checking the buffer limit before calling to strcat, will solve the problem, you can use dynamic allocation in case 256 bytes is not large enough
Oh same as mine, changing the allocation size from 256 to 1024 has solved the problem in my case.
The function hPatt_2_str
The function does
strcat
withpatt_str
as the destination without checking the buffer limit, that can cause to overflow of thep
global pointer that will cause a segmentation fault