freebsd-dev/usr.sbin/acpi
Don Lewis 7e2cc014bd Fix acpidump CID 1011278 (Buffer not null terminated) and other issues
Coverity reports that a buffer used for temporary file generation
might not be NUL terminated by strncpy().  This is probably not
true because the input gets passed through realpath(), but if the
path name is sufficiently long the name could be truncated and cause
other problems.  The code for generating the temp file names is
also overly complex.  Instead of a bunch of calls to strncpy() and
and strncat(), simplify the code by using snprintf() and add checks
for unexpected truncation.

The output file created by iasl -d is predictable.  Fix this by
using  mkdtemp() to create a directory to hold the iasl input and
output files.

Check the return values of more syscalls.

Reported by:	Coverity
CID:		1011278
Reviewed by:	jkim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6360
2016-05-24 23:36:43 +00:00
..
acpiconf Remove unsupported S5 (power off) state since r170976. 2015-09-22 16:35:32 +00:00
acpidb Merge ACPICA 20160422. 2016-04-27 19:09:21 +00:00
acpidump Fix acpidump CID 1011278 (Buffer not null terminated) and other issues 2016-05-24 23:36:43 +00:00
iasl Merge ACPICA 20160422. 2016-04-27 19:09:21 +00:00
Makefile
Makefile.inc Make acpi an individual package 2015-03-05 16:22:31 +00:00