char tmp[] = "hello world";
char *line;
size_t sz;
sz = strlen(tmp) +1;
line = (char*)malloc(sz);
if (line)
memset(line, 0x00, sz);
Using a tool called Fortify, it flags the memset as a Buffer Overflow. Any one know why?
char tmp[] = "hello world";
char *line;
size_t sz;
sz = strlen(tmp) +1;
line = (char*)malloc(sz);
if (line)
memset(line, 0x00, sz);
Using a tool called Fortify, it flags the memset as a Buffer Overflow. Any one know why?
Copyright © 2021 Jogjafile Inc.