o Check return of strdup() for NULL, abort if so.
Submitted by: jedgar
This commit is contained in:
parent
0a7da82d71
commit
7f5f9dc1d0
@ -91,7 +91,10 @@ initattr(int argc, char *argv[])
|
||||
overwrite = 1;
|
||||
break;
|
||||
case 'p':
|
||||
fs_path = strdup(optarg);
|
||||
if ((fs_path = strdup(optarg)) == NULL) {
|
||||
perror("strdup");
|
||||
return(-1);
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user