diff options
| author | Len Brown <len.brown@intel.com> | 2005-02-16 07:49:10 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2005-02-16 07:49:10 -0500 |
| commit | 3d53ecae24df7eef1c31f3f18f9fb8db5be09d9c (patch) | |
| tree | 566efd441e8d88d3e8bbc1eb43796e9de31f17d0 /drivers/acpi/executer/exstorob.c | |
| parent | 9694f9761a60be72698361cc543e0310b05aec31 (diff) | |
| parent | ce919ce106fdc1e27cbc27b4a2556d9d3cd79c7a (diff) | |
Merge intel.com:/home/lenb/bk/26-latest-ref
into intel.com:/home/lenb/src/26-latest-dev
Diffstat (limited to 'drivers/acpi/executer/exstorob.c')
| -rw-r--r-- | drivers/acpi/executer/exstorob.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index d5f5349543f8..4e2b442ee5a3 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c @@ -66,6 +66,7 @@ acpi_status acpi_ex_store_buffer_to_buffer ( + acpi_object_type original_src_type, union acpi_operand_object *source_desc, union acpi_operand_object *target_desc) { @@ -104,9 +105,16 @@ acpi_ex_store_buffer_to_buffer ( ACPI_MEMSET (target_desc->buffer.pointer, 0, target_desc->buffer.length); ACPI_MEMCPY (target_desc->buffer.pointer, buffer, length); - /* Set the new length of the target */ + /* + * If the original source was a string, we must truncate the buffer, + * according to the ACPI spec. Integer-to-Buffer and Buffer-to-Buffer + * copy must not truncate the original buffer. + */ + if (original_src_type == ACPI_TYPE_STRING) { + /* Set the new length of the target */ - target_desc->buffer.length = length; + target_desc->buffer.length = length; + } } else { /* Truncate the source, copy only what will fit */ |
