Add missing safety check
* src/system.c (sys_exec_info_script): Check if fdopen succeded. Fix by Matteo Croce.
This commit is contained in:
@@ -838,6 +838,12 @@ sys_exec_info_script (const char **archive_name, int volume_number)
|
||||
|
||||
xclose (p[PWRITE]);
|
||||
fp = fdopen (p[PREAD], "r");
|
||||
if (!fp)
|
||||
{
|
||||
signal (SIGPIPE, saved_handler);
|
||||
call_arg_error ("fdopen", info_script_option);
|
||||
return -1;
|
||||
}
|
||||
rc = getline (&buf, &size, fp);
|
||||
fclose (fp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user