提交 5d42b0fa 编写于 作者: D David Binderman 提交者: Rafael J. Wysocki

ACPICA: utstring: Check array index bound before use.

ACPICA BZ 1077. David Binderman.

References: https://bugs.acpica.org/show_bug.cgi?id=1077Signed-off-by: NDavid Binderman <dcb314@hotmail.com>
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Cc: 3.9+ <stable@vger.kernel.org> # 3.9.x: 42f8fb75: ACPICA: Source restructuring
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 1d44efab
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册