mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Change uses of sprintf to snprintf
git-svn-id: svn://coreboot.org/openbios/openbios-devel@277 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -19,12 +19,12 @@
|
||||
*/
|
||||
int printk( const char *fmt, ... )
|
||||
{
|
||||
char *p, buf[512]; /* XXX: no buffer overflow protection... */
|
||||
char *p, buf[512];
|
||||
va_list args;
|
||||
int i;
|
||||
|
||||
va_start(args, fmt);
|
||||
i=vsprintf(buf,fmt,args);
|
||||
i = vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
for( p=buf; *p; p++ )
|
||||
|
||||
Reference in New Issue
Block a user