Skip to content

Commit

Permalink
Fix crash in UnameHelper()
Browse files Browse the repository at this point in the history
fixes #11714
  • Loading branch information
gunnarbeutner committed May 12, 2016
1 parent f2e6694 commit 7f8a921
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/base/utility.cpp
Expand Up @@ -1435,6 +1435,9 @@ static String UnameHelper(char type)

FILE *fp = popen(cmd, "r");

if (!fp)
return "Unknown";

char line[1024];
std::ostringstream msgbuf;

Expand Down Expand Up @@ -1892,4 +1895,4 @@ String Utility::GetIcingaDataPath(void)
return String(path) + "\\icinga2";
}

#endif /* _WIN32 */
#endif /* _WIN32 */

0 comments on commit 7f8a921

Please sign in to comment.