freebsd-skq/usr.sbin/acpi
Don Lewis 668bf37a0e Fix acpidb CIDs 1011279 (Buffer not null terminated) and 978405 and
1199380 (Resource leak).

load_dsdt() calls strncpy() to copy a filename and Coverity warns
that the destination buffer may not be NUL terminated.  Fix this
by using strlcpy() instead.  If silent truncation occurs, then the
filename was not valid anyway.

load_dsdt() leaks an fd (CID 978405) and a memory region allocated
using mmap() (CID 1199380) when it returns.  Fix these by calling
close() and munmap() as appropriate.

Don't bother fixing the minor memory leak "list", allocated by
AcGetAllTablesFromFile() (CID 1355191).

Check for truncation when creating the temp file name.

Set a flag to indicate that the temp file should be unlinked.
Relying on a strcmp() test could delete the input file in contrived
cases.

Reported by:	Coverity
CID:		1011279, 978405, 1199380
Reviewed by:	jkim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6368
2016-05-24 23:41:36 +00:00
..
acpiconf Remove unsupported S5 (power off) state since r170976. 2015-09-22 16:35:32 +00:00
acpidb Fix acpidb CIDs 1011279 (Buffer not null terminated) and 978405 and 2016-05-24 23:41:36 +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