util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: B Watson <yalhcru@gmail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: column --separator segfaults (patch attached)
Date: Tue, 14 Aug 2012 18:30:04 +0200	[thread overview]
Message-ID: <20120814163004.GA20415@x2.net.home> (raw)
In-Reply-To: <CAN1hMuBe9PcKvdNr=A3uTgu0JDNT0mVkeDS3T4MNtfjoa40ZsQ@mail.gmail.com>

On Tue, Aug 14, 2012 at 05:57:01AM -0400, B Watson wrote:
> The --separator and --columns long options in util-linux-2.21.2 and in
> a git clone from 5 minutes ago, don't work:
> 
> # Short options OK:
> 
> $ echo foobar | column -s x
> foobar
> 
> $ echo foobar | column -c 10
> foobar
> 
> # Long options bad:
> 
> $ echo foobar | column --separator=x
> column: option '--separator' doesn't allow an argument
> 
> $ echo foobar | column --separator x
> Segmentation fault
> 
> $ echo foobar | column --columns 10
> column: bad columns width value: '(null)': Invalid argument
> 
> $ echo foobar | column --columns=10
> column: option '--columns' doesn't allow an argument
> 
> Looks like a simple case of missing has_arg flag in the "struct option"
> initialization for these two options. The patch just adds the flag. I
> haven't done thorough testing of the patched code, but it seems to work
> OK and it no longer segfaults or tries to dereference a null pointer.

 Applied, thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2012-08-14 16:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14  9:57 column --separator segfaults (patch attached) B Watson
2012-08-14 16:30 ` Karel Zak [this message]

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=20120814163004.GA20415@x2.net.home \
    --to=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    --cc=yalhcru@gmail.com \
    /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).