FS#39425 - [coreutils] shuf - segmentation fault [includes patch]

Attached to Project: Arch Linux
Opened by Billy Wayne McCann (bwayne) - Friday, 14 March 2014, 17:09 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 14 March 2014, 18:35 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Sébastien Luttringer (seblu)
Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When shuf executes -e without give the expected input lines, it will
assign n_lines to 0 in "write_random_lines" while the "repeat" (-r) be set.
and this var will be as the genmax parameter when "randint_genmax" function
called.

This leads to a segmentation fault.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16855

Additional info:
* package version(s)
coreutils 8.22

Steps to reproduce:
shuf -er or shuf -eer
Segmentation fault (core dumped)

*Note
I have attached the patch file, which can be found at
http://debbugs.gnu.org/cgi/bugreport.cgi?msg=10;filename=shuf.diff;att=1;bug=16855
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Friday, 14 March 2014, 18:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  coreutils 8.22-3

Loading...