forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/acpi/acpica/utprint.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: utprint - Formatted printing routines
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -332,7 +332,12 @@
332332 int i;
333333
334334 pos = string;
335
- end = string + size;
335
+
336
+ if (size != ACPI_UINT32_MAX) {
337
+ end = string + size;
338
+ } else {
339
+ end = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
340
+ }
336341
337342 for (; *format; ++format) {
338343 if (*format != '%') {