Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
inspection: Correct fix for segfault if /etc/SuSE-release is an empty…
… file.

The test was the wrong way round.

See: CVE-2013-2124.

This fixes commit ae8bb84.
  • Loading branch information
rwmjones committed Jun 1, 2013
1 parent 823628d commit 1c9dfd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inspect-fs-unix.c
Expand Up @@ -338,7 +338,7 @@ parse_suse_release (guestfs_h *g, struct inspect_fs *fs, const char *filename)
if (lines == NULL)
return -1;

if (lines[0] != NULL)
if (lines[0] == NULL)
goto out;

/* First line is dist release name */
Expand Down

0 comments on commit 1c9dfd0

Please sign in to comment.