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
No vulnerabilities are present
Line 1 should only use malloc(inputsize);
Line 2 should be for (i=0; i<=n, i++)
Line 1 should use calloc() instead of malloc()