freebsd-dev/usr.sbin/acpi/acpidump
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
..
acpi_user.c Fix a long standing logic bug introduced in r167814. The code was added to 2013-05-31 17:23:38 +00:00
acpi.c Fix acpidump CID 1011278 (Buffer not null terminated) and other issues 2016-05-24 23:36:43 +00:00
acpidump.8 use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
acpidump.c
acpidump.h
Makefile Merge ACPICA 20140926. 2014-10-02 19:11:18 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00