ACPICA: Fix externalize name to complete migration to ACPI_MOVE_NAME
authorBob Moore <robert.moore@intel.com>
Wed, 31 Oct 2012 02:28:19 +0000 (02:28 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Nov 2012 23:31:29 +0000 (00:31 +0100)
Fix for name segment copy and validation.

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>
drivers/acpi/acpica/nsutils.c

index 0d3d481..b5b4cb7 100644 (file)
@@ -557,8 +557,11 @@ acpi_ns_externalize_name(u32 internal_name_length,
                                (*converted_name)[j++] = '.';
                        }
 
-                       ACPI_MOVE_NAME(*converted_name, internal_name);
-                       acpi_ut_repair_name(*converted_name);
+                       /* Copy and validate the 4-char name segment */
+
+                       ACPI_MOVE_NAME(&(*converted_name)[j],
+                                      &internal_name[names_index]);
+                       acpi_ut_repair_name(&(*converted_name)[j]);
 
                        j += ACPI_NAME_SIZE;
                        names_index += ACPI_NAME_SIZE;