]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ACPICA: utstring: Check array index bound before use.
authorDavid Binderman <dcb314@hotmail.com>
Fri, 4 Apr 2014 04:36:55 +0000 (12:36 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 20 Apr 2014 20:59:37 +0000 (22:59 +0200)
ACPICA BZ 1077. David Binderman.

References: https://bugs.acpica.org/show_bug.cgi?id=1077
Signed-off-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: 3.9+ <stable@vger.kernel.org> # 3.9.x: 42f8fb75: ACPICA: Source restructuring
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/utstring.c

index 77219336c7e01f78c67003a1fc93e48d56e3197b..6dc54b3c28b07e2fe1b04002540a04a25cddfff1 100644 (file)
@@ -353,7 +353,7 @@ void acpi_ut_print_string(char *string, u16 max_length)
        }
 
        acpi_os_printf("\"");
-       for (i = 0; string[i] && (i < max_length); i++) {
+       for (i = 0; (i < max_length) && string[i]; i++) {
 
                /* Escape sequences */