The NetBSD Project

CVS log for src/sys/dev/acpi/acpi_ec.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / acpi

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: bouyer-xenpvh-base2


Revision 1.81 / (download) - annotate - [select for diffs], Sun Apr 12 01:12:03 2020 UTC (4 years ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored)

Reject overly large widths, from mlelstv.

We are returning an ACPI_INTEGER (= uint64_t), so it doesn't make
sense to handle more than 64 bits.

Apparently there are some ACPIs out there that ask for unreasonably
large widths here.  Just reject those requests, rather than writing
past the caller's stack buffer.

Previously we attempted to fix this by copying byte by byte as large
as the caller asked, in order to avoid the undefined behaviour of
shifting past the size of ACPI_INTEGER, but that just turned a shift
(which might have been harmless on real machines) into a stack buffer
overflow (!).

ok msaitoh

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>