Skip to content

Commit

Permalink
fix(install): segfault on popen error
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Sokolov authored and johannbg committed Nov 9, 2021
1 parent 1539845 commit 5c2f72f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/install/dracut-install.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ static int resolve_deps(const char *src)
ret = 0;

fptr = popen(cmd, "r");
if (fptr == NULL) {
log_error("Error '%s' initiating pipe stream from '%s'", strerror(errno), cmd);
exit(EXIT_FAILURE);
}

while (!feof(fptr)) {
char *p;
Expand Down

0 comments on commit 5c2f72f

Please sign in to comment.