ACPICA: Create and deploy safe version of strncpy

ACPICA commit 64ad9c69a1bd534a466e060a33c0bbf5fc9e189c

acpi_ut_safe_strncpy - copy and terminate string. Strncpy is not
guaranteed to terminate the copied string if the input is longer
than the length of the target.

No functional change.

Link: https://github.com/acpica/acpica/commit/64ad9c69
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
此提交包含在:
Bob Moore
2018-01-04 13:41:27 -08:00
提交者 Rafael J. Wysocki
父節點 2cb0ba70fb
當前提交 ee68d4773e
共有 5 個檔案被更改,包括 22 行新增9 行删除

查看文件

@@ -638,9 +638,11 @@ void ut_convert_backslashes(char *pathname);
void acpi_ut_repair_name(char *name);
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size);
u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
u8