Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171663999
D59562.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
800 B
Referenced Files
None
Subscribers
None
D59562.diff
View Options
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -632,9 +632,9 @@
* iterate until object->Package.Count so we actually go over all
* elements in the package.
*/
- for (size_t i = 0; i < object->Package.Count; i++) {
+ for (size_t i = 0, j = 0; i < object->Package.Count; i++) {
constraint_obj = &object->Package.Elements[i];
- constraint = &sc->constraints[i];
+ constraint = &sc->constraints[j];
constraint->enabled =
constraint_obj->Package.Elements[1].Integer.Value;
@@ -668,6 +668,8 @@
constraint_package->Package.Elements[1].Integer.Value;
constraint->min_dev_specific_state =
constraint_package->Package.Elements[2].Integer.Value;
+
+ j++;
}
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 13, 12:55 PM (14 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38697878
Default Alt Text
D59562.diff (800 B)
Attached To
Mode
D59562: acpi_spmc: Make sure constraints array doesn't end up sparse
Attached
Detach File
Event Timeline
Log In to Comment