android_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
Android.mk am 129b6d90: am 083b5ccb: Add liblog 2013-04-09 23:25:24 -07:00
MODULE_LICENSE_BSD
NOTICE
alarm.c
cat.c
chcon.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
chmod.c
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
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
iftop.c
insmod.c
ioctl.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
ionice.c
kill.c Conditionally use SIGSTKFLT 2012-08-01 15:51:09 -07:00
ln.c
load_policy.c Extend toolbox with SE Android support. 2012-02-03 11:11:15 -05:00
log.c
ls.c Add -i option to toolbox cmd ls 2013-04-03 17:39:19 -07:00
lsmod.c
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
mount.c Merge "fs_mgr: make block devices read-only" 2013-04-25 20:22:20 +00:00
mv.c
nandread.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
netstat.c
newfs_msdos.c Make sure FAT32 filesystems contain a minimum of 65527 clusters 2012-03-29 21:05:46 -07:00
notify.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
printenv.c
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
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
rmmod.c toolbox: rmmod: fix module unloading 2012-05-15 18:01:34 +05:30
rotatefb.c
route.c
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
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
setprop.c
setsebool.c Change setsebool syntax to be consistent with other init built-ins. 2012-12-13 15:41:53 -05:00
sleep.c
smd.c
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
syren.c
toolbox.c
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
wipe.c Try to unmount writable filesystems when rebooting 2011-03-10 18:11:46 -08:00