Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-14 14:39:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-14 14:39:18 +0400
commitffc8ecc5874931e7a0040141a7bc3ad1b70b17d0 (patch)
treee8c64602442e650b5c0c78a614d19a713571ecd0 /source/blender/quicktime
parentcf3b3a1ba2159792fad7cc0c8ccb98a855534823 (diff)
use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
Diffstat (limited to 'source/blender/quicktime')
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c4
-rw-r--r--source/blender/quicktime/apple/quicktime_import.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index c85df29de92..5e114bf7379 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -559,7 +559,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
#ifdef __APPLE__
EnterMoviesOnThread(0);
- sprintf(theFullPath, "%s", name);
+ strcpy(theFullPath, name);
/* hack: create an empty file to make FSPathMakeRef() happy */
myFile = open(theFullPath, O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRUSR | S_IWUSR);
@@ -575,7 +575,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
#endif
#ifdef _WIN32
qtname = get_valid_qtname(name);
- sprintf(theFullPath, "%s", qtname);
+ strcpy(theFullPath, qtname);
strcpy(name, qtname);
MEM_freeN(qtname);
diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c
index e44eba2bfe0..9481a37e3c7 100644
--- a/source/blender/quicktime/apple/quicktime_import.c
+++ b/source/blender/quicktime/apple/quicktime_import.c
@@ -210,13 +210,13 @@ int anim_is_quicktime(const char *name)
if (QTIME_DEBUG) printf("qt: checking as movie: %s\n", name);
#ifdef __APPLE__
- sprintf(theFullPath, "%s", name);
+ strcpy(theFullPath, name);
err = FSPathMakeRef(theFullPath, &myRef, 0);
err = FSGetCatalogInfo(&myRef, kFSCatInfoNone, NULL, NULL, &theFSSpec, NULL);
#else
qtname = get_valid_qtname(name);
- sprintf(theFullPath, "%s", qtname);
+ strcpy(theFullPath, qtname);
MEM_freeN(qtname);
CopyCStringToPascal(theFullPath, dst);
@@ -461,13 +461,13 @@ int startquicktime(struct anim *anim)
if (QTIME_DEBUG) printf("qt: attempting to load as movie %s\n", anim->name);
#ifdef __APPLE__
- sprintf(theFullPath, "%s", anim->name);
+ strcpy(theFullPath, anim->name);
err = FSPathMakeRef(theFullPath, &myRef, 0);
err = FSGetCatalogInfo(&myRef, kFSCatInfoNone, NULL, NULL, &theFSSpec, NULL);
#else
qtname = get_valid_qtname(anim->name);
- sprintf(theFullPath, "%s", qtname);
+ strcpy(theFullPath, qtname);
MEM_freeN(qtname);
CopyCStringToPascal(theFullPath, dst);
@@ -592,7 +592,7 @@ int imb_is_a_quicktime(char *name)
return 0;
}
- sprintf(theFullPath, "%s", name);
+ strcpy(theFullPath, name);
#ifdef __APPLE__
err = FSPathMakeRef(theFullPath, &myRef, 0);
err = FSGetCatalogInfo(&myRef, kFSCatInfoNone, NULL, NULL, &theFSSpec, NULL);