Skip to content

Commit

Permalink
ACPICA: Resource Mgr: Small fix for buffer size calculation
Browse files Browse the repository at this point in the history
Fixes a one byte error in the output buffer calculation.
Feng Tang - ACPICA BZ 849:
https://www.acpica.org/bugzilla/show_bug.cgi?id=849

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Feng Tang authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent abf95c3 commit bee6dc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/acpi/acpica/rscalc.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@ acpi_rs_get_list_length(u8 * aml_buffer,
* Get the number of vendor data bytes
*/
extra_struct_bytes = resource_length;

/*
* There is already one byte included in the minimum
* descriptor size. If there are extra struct bytes,
* subtract one from the count.
*/
if (extra_struct_bytes) {
extra_struct_bytes--;
}
break;

case ACPI_RESOURCE_NAME_END_TAG:
Expand Down

0 comments on commit bee6dc3

Please sign in to comment.