I have a buffer overFolw error in my code,but cppcheck didn't detect it. I'm using version 2.14.1.
here is the part of my code with buffer overFlow issue:
char buffer[100];
if(fread(buffer,1,100,file) != 100){
//return error message
}
// continue using the buffer variable without adding "\0" at the end
Hi everyone,
I have a buffer overFolw error in my code,but cppcheck didn't detect it. I'm using version 2.14.1.
here is the part of my code with buffer overFlow issue:
char buffer[100];
if(fread(buffer,1,100,file) != 100){
//return error message
}
// continue using the buffer variable without adding "\0" at the end
I ran the command:
any suggestion on why cppcheck missed this error? and who can make him focus in such this issue
Thancks!
How is cppcheck supposed to know if the buffer is supposed to be null-terminated manually?