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:
@@ -146,7 +146,7 @@ xf86OpenConsole(void)
|
||||
|
||||
i=0;
|
||||
while (vcs[i] != NULL) {
|
||||
sprintf(vtname, vcs[i], xf86Info.vtno); /* /dev/tty1-64 */
|
||||
snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */
|
||||
if ((xf86Info.consoleFd = open(vtname, O_RDWR|O_NDELAY, 0)) >= 0)
|
||||
break;
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user