linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arne Jansen <sensille@gmx.net>
To: chris.mason@oracle.com, linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-map-logical: segfaults when no output file is given
Date: Mon, 14 Mar 2011 12:57:49 +0100	[thread overview]
Message-ID: <1300103869-12180-1-git-send-email-sensille@gmx.net> (raw)

when no output file is given, info_file stays NULL and the following
fprintf segfaults. Default to stdout.
---
 btrfs-map-logical.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index a109c6a..aa4b5b5 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -175,6 +175,7 @@ int main(int ac, char **av)
 		exit(1);
 	}
 
+	info_file = stdout;
 	if (output_file) {
 		if (strcmp(output_file, "-") == 0) {
 			out_fd = 1;
-- 
1.7.3.4


                 reply	other threads:[~2011-03-14 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300103869-12180-1-git-send-email-sensille@gmx.net \
    --to=sensille@gmx.net \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).