busybox/archival/libarchive
Peter Korsgaard 2a053a2430 ar: read_num(): fix reading fields using the entire width
ar fields are fixed length text strings (padded with spaces). Ensure
bb_strtou doesn't read past the field in case the full width is used.

The fields are only read once, so the simplest/smallest solution to me
seems to be to just pass the length to read_num() and then zero terminate
the string before passing it to bb_strtou. This does mean that the fields
MUST be read in reverse order, so some minor reshuffling was needed.

Bloat-o-meter:
function                                             old     new   delta
get_header_ar                                        394     414     +20
read_num                                              29      36      +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0)               Total: 27 bytes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-09-10 16:22:12 +02:00
..
bz regularize options which control size/speed trade 2011-09-10 13:25:57 +02:00
unxz xz: mention xzminidec.c in README 2013-02-27 16:41:36 +01:00
data_align.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
data_extract_all.c rpm: use "create+rename" method of replacing existing files 2013-02-20 15:58:42 +01:00
data_extract_to_command.c *: change execl sentinels from NULL to (char*)0 2013-06-30 13:45:17 +02:00
data_extract_to_stdout.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
data_skip.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
decompress_bunzip2.c update seamless uncompression code 2012-03-06 16:27:48 +01:00
decompress_gunzip.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
decompress_uncompress.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
decompress_unlzma.c decompress_unlzma: move function, no code changes 2013-03-01 14:48:10 +01:00
decompress_unxz.c xz: fix put_unaligned_{l,b}e32 2013-02-27 18:32:58 +01:00
filter_accept_all.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_list_reassign.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
filter_accept_reject_list.c trivial small speed optimization 2012-06-22 15:54:05 +02:00
find_list_entry.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
get_header_ar.c ar: read_num(): fix reading fields using the entire width 2013-09-10 16:22:12 +02:00
get_header_cpio.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
get_header_tar_bz2.c update seamless uncompression code 2012-03-06 16:27:48 +01:00
get_header_tar_gz.c update seamless uncompression code 2012-03-06 16:27:48 +01:00
get_header_tar_lzma.c update seamless uncompression code 2012-03-06 16:27:48 +01:00
get_header_tar.c dpkg: fix creation of .list files (were empty since b768aeb). Closes 5324 2012-06-22 16:27:21 +02:00
header_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
header_skip.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
header_verbose_list.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
init_handle.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
Kbuild.src Fix build failures caused by not compiling open_transformer.c (#2) 2013-05-15 03:23:30 +02:00
liblzo.h
lzo1x_1.c
lzo1x_1o.c
lzo1x_9x.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
lzo1x_c.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
lzo1x_d.c whitespace cleanup. no code changes 2013-01-14 15:57:44 +01:00
open_transformer.c code shrink in check_errors_in_children() 2013-02-28 16:38:25 +01:00
seek_by_jump.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
seek_by_read.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00
unpack_ar_archive.c rename archive.h to bb_archive.h. no code changes 2011-09-22 12:45:14 +02:00