diff options
Diffstat (limited to 'daemon/parted.c')
-rw-r--r-- | daemon/parted.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/daemon/parted.c b/daemon/parted.c index 89cc0d69..068384ef 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -378,6 +378,14 @@ do_part_get_parttype (const char *device) } free_strings (lines); + + /* If "loop" return an error (RHBZ#634246). */ + if (STREQ (r, "loop")) { + free (r); + reply_with_error ("not a partitioned device"); + return NULL; + } + return r; } else { @@ -406,6 +414,13 @@ do_part_get_parttype (const char *device) return NULL; } + /* If "loop" return an error (RHBZ#634246). */ + if (STREQ (p, "loop")) { + free (p); + reply_with_error ("not a partitioned device"); + return NULL; + } + return p; /* caller frees */ } } |