* [PATCH] linux-2.6.0/sound/core/misc.c - vsnprintf
@ 2003-12-29 14:20 petter wahlman
0 siblings, 0 replies; only message in thread
From: petter wahlman @ 2003-12-29 14:20 UTC (permalink / raw)
To: perex; +Cc: linux-kernel
hi,
vsnprintf does not copy more than 'size' bytes _including_ '\0'
-p.
--- linux-2.6.0/sound/core/misc.c 2003-12-18 03:58:38.000000000
+0100
+++ linux-2.6.0-pw/sound/core/misc.c 2003-12-29 14:42:15.000000000
+0100
@@ -51,9 +51,8 @@
printk("ALSA %s:%d: ", file, line);
}
va_start(args, format);
- vsnprintf(tmpbuf, sizeof(tmpbuf)-1, format, args);
+ vsnprintf(tmpbuf, sizeof(tmpbuf), format, args);
va_end(args);
- tmpbuf[sizeof(tmpbuf)-1] = '\0';
printk(tmpbuf);
}
#endif
@@ -73,9 +72,8 @@
printk(KERN_DEBUG "ALSA %s:%d: ", file, line);
}
va_start(args, format);
- vsnprintf(tmpbuf, sizeof(tmpbuf)-1, format, args);
+ vsnprintf(tmpbuf, sizeof(tmpbuf), format, args);
va_end(args);
- tmpbuf[sizeof(tmpbuf)-1] = '\0';
printk(tmpbuf);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-29 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-29 14:20 [PATCH] linux-2.6.0/sound/core/misc.c - vsnprintf petter wahlman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®