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:
Blue Swirl
2008-11-30 13:44:38 +00:00
parent ad4a1b3af0
commit c77259ec3a
18 changed files with 45 additions and 38 deletions

View File

@@ -62,12 +62,12 @@ static int do_indent;
int
printk( const char *fmt, ... )
{
char *p, buf[1024]; /* XXX: no buffer overflow protection... */
char *p, buf[1024];
va_list args;
int i;
va_start(args, fmt);
i=vsprintf(buf,fmt,args);
i = vnsprintf(buf, sizeof(buf), fmt, args);
va_end(args);
for( p=buf; *p; p++ ) {