[3.11.y.z extended stable] Patch "ACPICA: utstring: Check array index bound before use." has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Thu Jun 26 10:33:53 UTC 2014


This is a note to let you know that I have just added a patch titled

    ACPICA: utstring: Check array index bound before use.

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 5c6588fde681157e21ad6b40e9ce7d6a78829ec6 Mon Sep 17 00:00:00 2001
From: David Binderman <dcb314 at hotmail.com>
Date: Fri, 4 Apr 2014 12:36:55 +0800
Subject: ACPICA: utstring: Check array index bound before use.

commit 5d42b0fa25df7ef2f575107597c1aaebe2407d10 upstream.

ACPICA BZ 1077. David Binderman.

References: https://bugs.acpica.org/show_bug.cgi?id=1077
Signed-off-by: David Binderman <dcb314 at hotmail.com>
Signed-off-by: Bob Moore <robert.moore at intel.com>
Signed-off-by: Lv Zheng <lv.zheng at intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/acpi/acpica/utstring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index c53759b76a3f..9edb65f516a6 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -352,7 +352,7 @@ void acpi_ut_print_string(char *string, u8 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 */

--
1.9.1





More information about the kernel-team mailing list