hush/libbb
Denis Vlasenko abee3d0e0d Fix xmalloc_fgets_str so that it really does NOT strip terminator.
Add xmalloc_fgetline_str which does strip terminator,
and use it in dpkg instead of xmalloc_fgets_str.
netstat: use xmalloc_fgets_str - allows to eat strings with NULs
(this fixes bug with some weird /proc/net/unix input)

function                                             old     new   delta
xmalloc_fgets_internal                                 -     191    +191
xmalloc_fgetline_str                                   -      18     +18
do_info                                              116     120      +4
unix_do_one                                          451     447      -4
tcp_do_one                                           423     419      -4
send_tree                                            369     365      -4
xmalloc_fgets_str                                    178      15    -163
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175)           Total: 38 bytes
   text    data     bss     dec     hex filename
 778445     832    7344  786621   c00bd busybox_old
 778483     832    7344  786659   c00e3 busybox_unstripped
2007-12-26 20:44:45 +00:00
..
appletlib.c defconfig: update 2007-12-24 12:16:24 +00:00
ask_confirmation.c
bb_askpass.c bb_askpass: handle Ctrl-C, restore termoios on Ctrl-C. 2007-10-20 19:20:22 +00:00
bb_basename.c
bb_do_delay.c
bb_pwd.c bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one; 2007-07-27 11:20:10 +00:00
bb_strtonum.c
change_identity.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
chomp.c
compare_string_array.c ifconfig: code shrink 2007-11-04 04:10:17 +00:00
concat_path_file.c
concat_subpath_file.c
Config.in Introduce FEATURE_COPYBUF_KB. 2007-12-02 03:27:42 +00:00
copy_file.c cp: make it a bit closer to POSIX, but still refuse to open and 2007-09-11 16:28:14 +00:00
copyfd.c explain why we use mmap instead of malloc 2007-12-02 07:18:29 +00:00
correct_password.c appletlib.c: make it actally follow _BB_SUID_ALWAYS rules 2007-10-29 19:25:45 +00:00
crc32.c
create_icmp6_socket.c s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
create_icmp_socket.c s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
crypt_make_salt.c
default_error_retval.c
device_open.c fbset: fix buglet where we were using wrong pointer 2007-11-06 03:05:54 +00:00
dump.c fbset: fix buglet where we were using wrong pointer 2007-11-06 03:05:54 +00:00
error_msg_and_die.c
error_msg.c
execable.c reorganize applet table. Eliminates pointers to names. 2007-11-28 06:49:03 +00:00
fclose_nonstdin.c
fflush_stdout_and_exit.c expand, unexpand: new applets from Tito <farmatito@tiscali.it> 2007-08-13 14:10:24 +00:00
fgets_str.c Fix xmalloc_fgets_str so that it really does NOT strip terminator. 2007-12-26 20:44:45 +00:00
find_mount_point.c
find_pid_by_name.c which: fix testsuite failure 2007-11-25 04:54:13 +00:00
find_root_device.c
full_write.c
get_console.c kbd_mode: new applet by Loïc Grenié <loic.grenie@gmail.com> 2007-10-20 00:17:34 +00:00
get_last_path_component.c *: kill bb_get_last_path_component, replace with two functions 2007-09-24 18:27:04 +00:00
get_line_from_file.c Fix xmalloc_fgets_str so that it really does NOT strip terminator. 2007-12-26 20:44:45 +00:00
getopt32.c more "if (p) free(p)" fixes; fix a typo in comment 2007-09-28 22:13:55 +00:00
herror_msg_and_die.c v[hp]error_msg have 2-3 callsites only -> incorporate there. 2007-08-15 20:07:53 +00:00
herror_msg.c v[hp]error_msg have 2-3 callsites only -> incorporate there. 2007-08-15 20:07:53 +00:00
human_readable.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
inet_common.c s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
info_msg.c trylink: automatically use custom link script if user provides one 2007-08-14 16:43:01 +00:00
inode_hash.c make copy_file() a bit easier to understand, and smaller 2007-08-25 21:14:55 +00:00
isdirectory.c
Kbuild another fix for build failure found by randomconfig 2007-10-17 09:59:01 +00:00
kernel_version.c
last_char_is.c
lineedit.c nameif: extended matching (Nico Erfurth <masta@perlgolf.de>) 2007-12-24 14:09:19 +00:00
llist.c
login.c login: clear dangerous environment variables if started by non-root 2007-11-06 05:26:51 +00:00
loop.c mount: print errno on NFS error (again) 2007-08-03 14:16:24 +00:00
make_directory.c stat: fix option -Z segv (bug 1454) 2007-08-09 08:10:13 +00:00
makedev.c
match_fstype.c
md5.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
messages.c remove trailing whitespace 2007-10-14 04:55:59 +00:00
mode_string.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
mtab_file.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
mtab.c
obscure.c fbset: fix buglet where we were using wrong pointer 2007-11-06 03:05:54 +00:00
parse_mode.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
perror_msg_and_die.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
perror_msg.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
perror_nomsg_and_die.c
perror_nomsg.c
pidfile.c if pidfile turned out to be !regular file, do not unlink it. 2007-08-15 20:05:37 +00:00
process_escape_sequence.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
procps.c trivial typo fix 2007-09-29 22:49:26 +00:00
pw_encrypt.c
read.c
README
recursive_action.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
remove_file.c
restricted_shell.c
run_shell.c *: kill bb_get_last_path_component, replace with two functions 2007-09-24 18:27:04 +00:00
safe_poll.c introduce safe_poll (fixes a problem in top) 2007-09-27 10:09:59 +00:00
safe_strncpy.c introduce safe_poll (fixes a problem in top) 2007-09-27 10:09:59 +00:00
safe_write.c
selinux_common.c ping: fix breakage from -I fix 2007-10-20 02:00:49 +00:00
setup_environment.c setup_environment: code shrink 2007-09-10 13:15:28 +00:00
sha1.c
simplify_path.c
skip_whitespace.c documentation bits in comments, no code changes 2007-09-25 18:35:28 +00:00
speed_table.c style fix (stray space before ';') 2007-07-21 15:08:09 +00:00
str_tolower.c
time.c
trim.c syscall: code shrink 2007-10-29 19:22:13 +00:00
u_signal_names.c signal names hack was wrong, it broke "get signal name" function. 2007-12-04 21:44:52 +00:00
udp_io.c
update_passwd.c xmalloc_follow_symlinks() -- fix ELOOP issue with absolute paths, 2007-11-08 20:00:36 +00:00
uuencode.c trylink: produce even more info about final link stage 2007-08-12 20:58:27 +00:00
vdprintf.c httpd: fix CGI handling bug (we were closing wrong fd). 2007-08-11 20:20:02 +00:00
verror_msg.c perror_nomsg: don't print extra colon 2007-12-22 15:44:23 +00:00
vfork_daemon_rexec.c Further optimize applet tables; prettify build output 2007-11-29 03:31:20 +00:00
warn_ignoring_args.c
wfopen_input.c
wfopen.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
xatonum_template.c num conversions: allow for leading '+' (renice needs that) 2007-12-11 13:15:11 +00:00
xatonum.c
xconnect.c Introduce FEATURE_PREFER_IPV4_ADDRESS. If selected, we have: 2007-11-14 10:18:33 +00:00
xfuncs.c 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>. 2007-10-01 11:58:38 +00:00
xgetcwd.c xrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time 2007-09-29 19:19:55 +00:00
xgethostbyname.c s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
xreadlink.c syslogd: support "symlink to symlink" for /dev/log; reduce stack usage 2007-11-10 01:28:19 +00:00
xregcomp.c

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>