fix(install): segfault on popen error

master
Andrey Sokolov 2021-10-21 09:01:07 +03:00 committed by Jóhann B. Guðmundsson
parent 1539845868
commit 5c2f72f152
1 changed files with 4 additions and 0 deletions

View File

@ -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;