(360/RARCH_CONSOLE) Change sprintfs to snprintfs

This commit is contained in:
TwinAphex51224 2012-05-22 17:02:24 +02:00
parent dd6ec8222f
commit 62beb6f63d
3 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ static int Mount( int Device, char* MountPoint )
char MountConv[260]; char MountConv[260];
char * SysPath = NULL; char * SysPath = NULL;
sprintf_s( MountConv,"\\??\\%s", MountPoint ); snprintf_s( MountConv, sizeof(MountConv), "\\??\\%s", MountPoint );
switch( Device ) switch( Device )
{ {

View File

@ -1846,7 +1846,7 @@ voidp gzdopen (int fd, const char * mode)
char name[20]; char name[20];
if (fd < 0) return (voidp)0; if (fd < 0) return (voidp)0;
sprintf(name, "<fd:%d>", fd); /* for debugging */ snprintf(name, sizeof(name), "<fd:%d>", fd); /* for debugging */
return gz_open (name, mode, fd); return gz_open (name, mode, fd);
} }

View File

@ -370,7 +370,7 @@ int main(int argc, char *argv[])
for(unsigned int i = 0; i < sizeof(spawn_data); ++i) for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
spawn_data[i] = i & 0xff; spawn_data[i] = i & 0xff;
sprintf(spawn_data_size, "%d", 256); snprintf(spawn_data_size, sizeof(spawn_data_size), "%d", 256);
const char * const spawn_argv[] = { const char * const spawn_argv[] = {
spawn_data_size, spawn_data_size,