Convert a bunch of sprintf to snprintf calls

This batch is the straightforward set - others are more complex and
need more analysis to determine right size to pass.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Alan Coopersmith
2011-10-29 11:08:17 -07:00
parent b967bf2af2
commit 05d8a7f7a7
20 changed files with 119 additions and 115 deletions

View File

@@ -109,7 +109,7 @@ LinuxInit (void)
close(fd);
}
sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */
snprintf(vtname,sizeof(vtname),"/dev/tty%d",vtno); /* /dev/tty1-64 */
if ((LinuxConsoleFd = open(vtname, O_RDWR|O_NDELAY, 0)) < 0)
{