C - memset segfault for statically allocated char array
- by user1327031
I get a segfault when trying to memset an array of chars that was allocated statically, but not for an array of the same length that was allocated using malloc.
variable definitions:
//static
char inBuff[IN_BUFF_LEN];
//dynamic
char * inBuffD;
function call:
//static, cast used because char** != char (*) [n]
…