#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
char *first, *second, *third;
first = malloc(888);
second = malloc(22);
third = malloc(22);
strcpy(first, argv[1]);
strcpy(second, argv[2]);
free(first);
free(second);
free(third);
return(0);
}
Like I said before, I need help learning C and trying to figure out my errors. With this code, am I vulnerable in terms of memory allocation? Could an attacker take advantage? If yes, please help me with your recommendations and guides
Thanks