Re: column --separator segfaults (patch attached)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux