* [PATCH] arm: early_printk: do bound check independent of @n
@ 2014-11-21 19:28 Arjun Sreedharan
0 siblings, 0 replies; only message in thread
From: Arjun Sreedharan @ 2014-11-21 19:28 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
---
arch/arm/kernel/early_printk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
index 4307653..9e05f8a 100644
--- a/arch/arm/kernel/early_printk.c
+++ b/arch/arm/kernel/early_printk.c
@@ -16,7 +16,7 @@ extern void printch(int);
static void early_write(const char *s, unsigned n)
{
- while (n-- > 0) {
+ while (*s && n-- > 0) {
if (*s == '\n')
printch('\r');
printch(*s);
--
1.7.11.7
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-21 19:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 19:28 [PATCH] arm: early_printk: do bound check independent of @n Arjun Sreedharan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).