o Check return of strdup() for NULL, abort if so.
Submitted by: jedgar
This commit is contained in:
parent
ff93e72c08
commit
58ef75f022
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70003
@ -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