summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/utprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utprint.c')
-rw-r--r--drivers/acpi/acpica/utprint.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c
index a874dac7db5c..681c11f4af4e 100644
--- a/drivers/acpi/acpica/utprint.c
+++ b/drivers/acpi/acpica/utprint.c
@@ -332,7 +332,12 @@ int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
int i;
pos = string;
- end = string + size;
+
+ if (size != ACPI_UINT32_MAX) {
+ end = string + size;
+ } else {
+ end = ACPI_CAST_PTR(char, ACPI_UINT32_MAX);
+ }
for (; *format; ++format) {
if (*format != '%') {