removed strcat and strcpy and switched to correct versions

master
silverwizard 7 years ago
parent 87ed6a80ea
commit 5b4ff0d800
  1. 4
      dpu.c

@ -28,8 +28,8 @@ int main (int argc, char **argv){
fputs("It's a filename, not a novel.\n", stderr); fputs("It's a filename, not a novel.\n", stderr);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
strcpy(name,argv[arg]); strlcpy(name,argv[arg],sizeof(name));
strcat(name,".dpu"); strlcat(name,".dpu",sizeof(name));
if((bob = fopen(argv[arg],"r"))==NULL){ if((bob = fopen(argv[arg],"r"))==NULL){
fputs("NO YOU FOOL, A REAL ONE!\n",stderr); fputs("NO YOU FOOL, A REAL ONE!\n",stderr);
return EXIT_FAILURE; return EXIT_FAILURE;

Loading…
Cancel
Save