mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-29 14:37:56 +00:00
btrfs-map-logical: segfaults when no output file is given
when no output file is given, info_file stays NULL and the following fprintf segfaults. Default to stdout. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
This commit is contained in:
parent
925ac32518
commit
48d29930ed
@ -173,6 +173,7 @@ int main(int ac, char **av)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info_file = stdout;
|
||||||
if (output_file) {
|
if (output_file) {
|
||||||
if (strcmp(output_file, "-") == 0) {
|
if (strcmp(output_file, "-") == 0) {
|
||||||
out_fd = 1;
|
out_fd = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user