diff options
-rw-r--r-- | arch/um/drivers/cow_user.c | 3 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index a9afccf68e38..0ec4052db9c5 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c | |||
@@ -210,8 +210,9 @@ int write_cow_header(char *cow_file, int fd, char *backing_file, | |||
210 | 210 | ||
211 | err = -EINVAL; | 211 | err = -EINVAL; |
212 | if(strlen(backing_file) > sizeof(header->backing_file) - 1){ | 212 | if(strlen(backing_file) > sizeof(header->backing_file) - 1){ |
213 | /* Below, %zd is for a size_t value */ | ||
213 | cow_printf("Backing file name \"%s\" is too long - names are " | 214 | cow_printf("Backing file name \"%s\" is too long - names are " |
214 | "limited to %d characters\n", backing_file, | 215 | "limited to %zd characters\n", backing_file, |
215 | sizeof(header->backing_file) - 1); | 216 | sizeof(header->backing_file) - 1); |
216 | goto out_free; | 217 | goto out_free; |
217 | } | 218 | } |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 1646f396056c..09f1c140a769 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -615,7 +615,7 @@ static void console_write(struct console *console, const char *string, | |||
615 | return; | 615 | return; |
616 | 616 | ||
617 | while(1){ | 617 | while(1){ |
618 | n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index); | 618 | n = min((size_t) len, ARRAY_SIZE(console_buf) - console_index); |
619 | strncpy(&console_buf[console_index], string, n); | 619 | strncpy(&console_buf[console_index], string, n); |
620 | console_index += n; | 620 | console_index += n; |
621 | string += n; | 621 | string += n; |