OSDN Git Service

[General] Tracking to upstream, rev 2015-01-14.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz700 / quickdisk.cpp
index 524ae68..f5e906e 100644 (file)
@@ -322,7 +322,7 @@ void QUICKDISK::open_disk(_TCHAR path[])
        // load disk image\r
        FILEIO* fio = new FILEIO();\r
        if(fio->Fopen(path, FILEIO_READ_BINARY)) {\r
-               _tcscpy(file_path, path);\r
+               _tcscpy_s(file_path, _MAX_PATH, path);\r
                \r
                // clear buffer\r
                for(int i = 0; i < QUICKDISK_BUFFER_SIZE; i++) {\r
@@ -506,9 +506,9 @@ void QUICKDISK::release_disk()
                // check extension\r
                _TCHAR file_path_tmp[_MAX_PATH];\r
                if(check_file_extension(file_path, _T(".mzt")) || check_file_extension(file_path, _T(".q20"))) {\r
-                       _tcscpy(file_path_tmp, file_path);\r
+                       _tcscpy_s(file_path_tmp, _MAX_PATH, file_path);\r
                } else {\r
-                       _stprintf(file_path_tmp, _T("%s.mzt"), get_file_path_without_extensiton(file_path));\r
+                       _stprintf_s(file_path_tmp, _MAX_PATH, _T("%s.mzt"), get_file_path_without_extensiton(file_path));\r
                }\r
                // save blocks as mzt file\r
                FILEIO* fio = new FILEIO();\r