Tag: security
Questions Related to security
Are there any memory issues in the following code? Please assume that variable inputsize has the correct size.
int add_num_array(int inputsize, int num) {
int *newnum = malloc (inputsize * sizeof(int)); /* 1 */
int i;
for (i=0; i
What is the vulnerability in this code?
char output[20];
/* Assume data is a character array with value %200d asdf */
sprintf(output, data);
Which compilation switch should be enabled for stack protection? Choose the best and most secure option.