Pádraig Brady
d91aeef052
pr: fix read from invalid memory with tabs in separator
...
This was detected with:
echo a > a; pr "-S$(printf "\t\t\t")" a -m a > /dev/null
Resulting in ASAN triggering:
====================================================
ERROR: AddressSanitizer: global-buffer-overflow
READ of size 1 at 0x00000041b622 thread T0
#0 0x40506a in print_sep_string ../src/pr.c:2241
#1 0x407ec4 in read_line ../src/pr.c:2493
#2 0x40985c in print_page ../src/pr.c:1802
#3 0x40985c in print_files ../src/pr.c:1618
#4 0x4036e0 in main ../src/pr.c:1136
* src/pr.c (init_parameters): Ensure we only override the
specified separator when it's a single tab, thus matching
the calculated separator length.
* tests/pr/pr-tests.pl: Add a test case.
* NEWS: Mention the fix.
2016-11-25 14:08:42 +00:00
..
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
1996-12-28 05:14:37 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2001-03-17 08:49:25 +00:00
2001-03-17 08:49:25 +00:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2009-03-07 23:52:08 +01:00
2016-11-25 14:08:42 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1999-04-15 13:26:50 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1996-12-28 05:14:37 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1997-02-16 19:08:01 +00:00
1997-02-16 19:08:01 +00:00
1997-02-16 19:08:01 +00:00
1997-02-16 19:08:01 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
1999-04-15 13:26:50 +00:00
2007-07-04 12:45:10 +02:00
2010-01-06 21:07:23 -07:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00
2007-07-04 12:45:10 +02:00