From 62beb6f63d19ca6f7e9b686d6cd7bda2ccc9a70e Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Tue, 22 May 2012 17:02:24 +0200 Subject: [PATCH] (360/RARCH_CONSOLE) Change sprintfs to snprintfs --- 360/main.c | 2 +- console/rzlib/rzlib.c | 2 +- console/salamander/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/360/main.c b/360/main.c index b36574f769..875d7c3d1d 100644 --- a/360/main.c +++ b/360/main.c @@ -81,7 +81,7 @@ static int Mount( int Device, char* MountPoint ) char MountConv[260]; char * SysPath = NULL; - sprintf_s( MountConv,"\\??\\%s", MountPoint ); + snprintf_s( MountConv, sizeof(MountConv), "\\??\\%s", MountPoint ); switch( Device ) { diff --git a/console/rzlib/rzlib.c b/console/rzlib/rzlib.c index e1de22bdc1..f497b8a44d 100644 --- a/console/rzlib/rzlib.c +++ b/console/rzlib/rzlib.c @@ -1846,7 +1846,7 @@ voidp gzdopen (int fd, const char * mode) char name[20]; if (fd < 0) return (voidp)0; - sprintf(name, "", fd); /* for debugging */ + snprintf(name, sizeof(name), "", fd); /* for debugging */ return gz_open (name, mode, fd); } diff --git a/console/salamander/main.c b/console/salamander/main.c index 68598ed293..f9b84205fc 100644 --- a/console/salamander/main.c +++ b/console/salamander/main.c @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) for(unsigned int i = 0; i < sizeof(spawn_data); ++i) 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[] = { spawn_data_size,