freebsd-skq/bin
truckman c77fcd4fd3 MFC r301582
Explicitly NUL terminate the buffer filled by fread().

The fix in r300649 was not sufficient to convince Coverity that the
buffer was NUL terminated, even with the buffer pre-zeroed.  Swap
the size and nmemb arguments to fread() so that a valid lenght is
returned, which we can use to terminate the string in the buffer
at the correct location.  This should also quiet the complaint about
the return value of fread() not being checked.

Reported by:	Coverity
CID:		1019054, 1009614
Secur3ty:
Sponsore dby:
2016-06-15 06:33:40 +00:00
..
cat MFC r276669,r276723: 2015-12-15 18:09:03 +00:00
chflags MFC r282208: 2015-06-01 09:04:57 +00:00
chio Update chio(1) and ch(4) to support reporting element designators. 2013-04-19 20:03:51 +00:00
chmod MFC r282208: 2015-06-01 09:04:57 +00:00
cp MFC r277645: cp,mv,touch: Set timestamps with nanosecond precision. 2016-04-10 15:02:29 +00:00
csh MFC 297673: 2016-04-10 18:12:04 +00:00
date MFC r282608: 2015-05-21 18:59:11 +00:00
dd MFC r295749: 2016-04-19 07:34:31 +00:00
df MFC r287236: 2015-09-14 17:40:57 +00:00
domainname Point users towards nisdomainname and rc.conf. 2013-04-22 17:55:12 +00:00
echo echo(1): Clarify portability and mention literal "--" handling. 2010-11-12 22:43:40 +00:00
ed MFC r300322, 300340: 2016-06-03 03:20:54 +00:00
expr MFC r280357: 2015-04-06 14:45:40 +00:00
freebsd-version MFC r291942: 2015-12-14 20:29:31 +00:00
getfacl Fix warnings found by -Wmising-variable-declarations. 2012-10-19 05:43:38 +00:00
hostname Mark usage() __dead2 2013-04-28 22:52:43 +00:00
kenv Constify parameters, no functional or binary change. 2013-05-15 18:38:28 +00:00
kill Remove cast that was only required for K&R C. 2013-04-28 22:05:01 +00:00
ln MFC r278848: symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW). 2015-03-10 22:23:56 +00:00
ls MFC r300939: 2016-06-08 14:07:43 +00:00
mkdir Add missing static qualifiers 2013-04-27 21:59:43 +00:00
mv MFC r300643 2016-06-01 17:30:50 +00:00
pax MFC r292877: 2016-01-06 16:32:39 +00:00
pkill MFC r287012: 2015-08-29 02:41:59 +00:00
ps MFC r300648 2016-06-01 17:33:02 +00:00
pwait Use a different way to silence clang analyzer as done in r245494 by 2013-01-16 18:15:25 +00:00
pwd
rcp Fix warnings found by -Wmising-variable-declarations. 2012-10-19 05:43:38 +00:00
realpath Make `realpath'' behave like `realpath .''. 2011-06-21 19:34:57 +00:00
rm MFC r290480 2015-11-10 07:17:38 +00:00
rmail Bump WARNS where possible. 2010-02-15 14:07:40 +00:00
rmdir Add a few examples. 2013-03-15 20:12:54 +00:00
setfacl MFC r301582 2016-06-15 06:33:40 +00:00
sh MFC r301139 2016-06-08 01:17:22 +00:00
sleep MFC r272777,r272779,r272780,r272781,r272782,r272783,r272784,r272787,r272788: 2015-01-01 02:04:44 +00:00
stty stty: Mark usage() __dead2. 2012-07-15 21:12:22 +00:00
sync
test MFC r259017: test: Avoid looking up again the type of a known binary 2016-04-09 21:55:58 +00:00
tests Sync sh(1) in stable/10 to head. 2014-03-09 17:04:31 +00:00
uuidgen Mention the upper hard limit for -n option. Patch slightly modified 2012-05-23 16:19:19 +00:00
Makefile MFC r263778: 2014-04-09 18:16:58 +00:00
Makefile.inc