Changed undpu to use strlcpy

remotes/1696625325996769446/tmp_refs/heads/master
silverwizard 5 years ago
parent e448ad953e
commit 7ef7e29ebb
  1. 2
      undpu.c

@ -41,7 +41,7 @@ int main (int argc, char **argv){
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }
strncpy(output,argv[1],strlen(argv[1])-4); strlcpy(output,argv[1],strlen(argv[1])-4);
if((joe = fopen(output,"w"))==NULL){ if((joe = fopen(output,"w"))==NULL){
fputs("Ummm, the output file doesn't work.\n",stderr); fputs("Ummm, the output file doesn't work.\n",stderr);
return EXIT_FAILURE; return EXIT_FAILURE;

Loading…
Cancel
Save