mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
m68k: sun3: Replace vsprintf() with bounded vsnprintf()
vsprintf() performs no bounds checking and can overflow - replace it
with the safer vsnprintf().
Also remove the useless '+ 1' that is a leftover of commit 66ed28ea09
("m68k: sun3: Remove unused vsprintf() return value in prom_printf()").
Signed-off-by: Thorsten Blum <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
This commit is contained in:
1 parent
f16a9577b7
commit
cb39cf99d8
1 file changed
+2
-2
@@ -30,9 +30,9 @@ prom_printf(char *fmt, ...)
|
||||
|
||||
#ifdef CONFIG_KGDB
|
||||
ppbuf[0] = 'O';
|
||||
vsprintf(ppbuf + 1, fmt, args) + 1;
|
||||
vsnprintf(ppbuf + 1, sizeof(ppbuf) - 1, fmt, args);
|
||||
#else
|
||||
vsprintf(ppbuf, fmt, args);
|
||||
vsnprintf(ppbuf, sizeof(ppbuf), fmt, args);
|
||||
#endif
|
||||
|
||||
bptr = ppbuf;
|
||||
|
||||
Reference in new issue
Block a user