]> git.sesse.net Git - vlc/commitdiff
WinVLC: use _snwprintf that is conforming to the standard
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jan 2013 15:03:48 +0000 (16:03 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jan 2013 14:07:17 +0000 (15:07 +0100)
bin/winvlc.c

index 583dbb26ae31bb214611f1a8bc2e8153f8f3a327..59e64fa12915741ccc94a84aba5628fa722130d9 100644 (file)
@@ -132,7 +132,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
         if( S_OK != SHGetFolderPathW( NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
                     NULL, SHGFP_TYPE_CURRENT, path ) )
             fprintf( stderr, "Can't open the vlc conf PATH\n" );
-        swprintf( path+wcslen( path ), L"%s", L"\\vlc\\crashdump" );
+        _snwprintf( path+wcslen( path ), MAX_PATH,  L"%s", L"\\vlc\\crashdump" );
         crashdump_path = &path[0];
 
         check_crashdump();
@@ -188,7 +188,7 @@ static void check_crashdump(void)
                 SYSTEMTIME now;
                 GetSystemTime(&now);
                 wchar_t remote_file[MAX_PATH];
-                swprintf(remote_file,
+                _snwprintf(remote_file, MAX_PATH,
                         L"/crashes-win32/%04d%02d%02d%02d%02d%02d",
                         now.wYear, now.wMonth, now.wDay, now.wHour,
                         now.wMinute, now.wSecond );