platform_system_core/toolbox
Nick Kralevich 960ac434a4 fix strncat misuse
The third argument of strncat() tells how much data to append from
src, not the total size of the buffer.

Change uses of strncat() to strlcat(), which has the buffer overflow
protection behavior intended by the original author.

This fixes the following compiler warning:

In function 'strncat',
    inlined from 'print_type' at system/core/toolbox/lsof.c:76:12:
bionic/libc/include/string.h:142:5: warning: call to __builtin___strncat_chk might overflow destination buffer [enabled by default]

Change-Id: Id69edc641de3cb87d1867a409cd57b04b12f90a7
2013-06-03 12:13:36 -07:00
..
cp Ported "cp" from NetBSD to toolbox. 2012-07-13 16:26:30 -07:00
grep Ported "grep" from NetBSD to toolbox. 2012-07-13 16:37:38 -07:00
alarm.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
Android.mk am 129b6d90: am 083b5ccb: Add liblog 2013-04-09 23:25:24 -07:00
cat.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
chcon.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
chmod.c Add -R to chmod 2010-07-14 13:30:11 -05:00
chown.c Merge "Change "chown" to coreutils syntax." 2012-03-02 16:10:50 -08:00
clear.c Added clear command to toolbox 2012-08-07 21:47:51 -07:00
cmp.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
date.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
dd.c use lseek64 to resolve offset oveflow 2013-04-17 14:05:55 -07:00
dd.h Enable conv=fdatasync in dd. 2012-05-29 14:26:04 -07:00
df.c Fixed improper size displaying in 'df' utility 2012-10-02 10:39:19 +02:00
dmesg.c toolbox/dmesg: do not hardcode KLOG_BUF_LEN 2013-04-01 21:50:03 +05:30
du.c Make usage() static in du.c to avoid conflicts 2012-08-13 16:02:55 -04:00
dynarray.c toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
dynarray.h toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
exists.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
getenforce.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
getevent.c Make timestamps friendlier. 2011-11-23 15:02:41 -08:00
getevent.h Enhance getevent to print event labels. 2011-06-15 17:44:52 -07:00
getprop.c Fix getprop Format 2011-02-14 17:17:21 -08:00
getsebool.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
hd.c Fix hd command so it doesn't error out on EOF 2012-01-12 15:17:07 -08:00
id.c Remove HAVE_SELINUX guards 2012-10-16 12:34:06 -07:00
ifconfig.c toolbox: ifconfig: Implement mtu setting, plus setting interface addr should 2009-05-14 07:28:52 -07:00
iftop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
insmod.c fix insmod reading more than one module parameter 2010-04-20 09:53:12 +05:30
ioctl.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
ionice.c system: Add support for getting/setting i/o priorities and include a userspace tool 2010-02-25 14:02:55 -08:00
kill.c Conditionally use SIGSTKFLT 2012-08-01 15:51:09 -07:00
ln.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
load_policy.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
log.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ls.c Add -i option to toolbox cmd ls 2013-04-03 17:39:19 -07:00
lsmod.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
lsof.c fix strncat misuse 2013-06-03 12:13:36 -07:00
lsusb.c toolbox: add verbose option for lsusb 2010-12-09 17:14:27 -08:00
md5.c Add md5 command to toolbox. 2012-01-11 18:13:26 -08:00
mkdir.c Add -p support to mkdir 2010-07-14 13:29:42 -05:00
MODULE_LICENSE_BSD auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
mount.c Merge "fs_mgr: make block devices read-only" 2013-04-25 20:22:20 +00:00
mv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
nandread.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
netstat.c netstat should include /proc/net/tcp6 and /proc/net/udp6 data 2010-09-28 22:22:02 -07:00
newfs_msdos.c Make sure FAT32 filesystems contain a minimum of 65527 clusters 2012-03-29 21:05:46 -07:00
NOTICE Correct copyright header for uptime and NOTICE 2010-07-27 11:26:06 -07:00
notify.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
printenv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ps.c Add get_sched_policy_name() and use in ps and top 2012-03-15 15:10:45 -07:00
r.c Accept address ranges in r 2011-01-19 17:23:40 -08:00
readtty.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
renice.c toolbox: renice: Add -t TYPE parameter and switch to getopt 2013-01-22 16:59:36 -08:00
restorecon.c Add support for reloading policy from /data/system. 2012-08-09 09:59:10 -04:00
rm.c toolbox: Fix rm -f with multiple files 2013-03-25 19:59:21 -07:00
rmdir.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rmmod.c toolbox: rmmod: fix module unloading 2012-05-15 18:01:34 +05:30
rotatefb.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
route.c Userland support for VM interconnection 2010-07-15 13:19:37 +02:00
runcon.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
schedtop.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
sendevent.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setconsole.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
setenforce.c Make setenforce usage function static. 2012-08-13 12:56:23 -07:00
setkey.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setprop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setsebool.c Change setsebool syntax to be consistent with other init built-ins. 2012-12-13 15:41:53 -05:00
sleep.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
smd.c Automated import from //branches/master/...@142981,142981 2009-03-26 14:14:15 -07:00
start.c Restart surfaceflinger with stop/start too. 2011-03-07 10:39:17 -08:00
stop.c Restart surfaceflinger with stop/start too. 2011-03-07 10:39:17 -08:00
sync.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
syren.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
toolbox.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
top.c Add get_sched_policy_name() and use in ps and top 2012-03-15 15:10:45 -07:00
touch.c Add the touch command to toolbox. 2011-04-05 20:50:03 -07:00
umount.c Show why umount failed. 2011-07-14 13:43:57 -07:00
uptime.c uptime: Use clock_gettime to get monotonic time 2011-01-05 15:22:09 -08:00
vmstat.c vmstat: Fix -n flag 2012-07-10 10:43:57 +05:30
watchprops.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
wipe.c Try to unmount writable filesystems when rebooting 2011-03-10 18:11:46 -08:00