* lib-src/yow.c (main): Make sure argv[2] is not NULL before copying
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
char file[BUFSIZ];
if (argc > 2 && !strcmp(argv[1], "-f")) {
char file[BUFSIZ];
if (argc > 2 && !strcmp(argv[1], "-f")) {
- xstrncpy(file, argv[2], sizeof(file)-1);
- file[sizeof(file)-1]='\0';
+ assert(argv[2] != NULL);
+ xstrncpy(file, argv[2], sizeof(file));
} else {
#ifdef PATH_DATA
#ifdef vms
} else {
#ifdef PATH_DATA
#ifdef vms