aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/moviemaker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/moviemaker.cpp')
-rw-r--r--linden/indra/newview/moviemaker.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/linden/indra/newview/moviemaker.cpp b/linden/indra/newview/moviemaker.cpp
index 1054f1a..0f60bb1 100644
--- a/linden/indra/newview/moviemaker.cpp
+++ b/linden/indra/newview/moviemaker.cpp
@@ -52,7 +52,7 @@ HBITMAP LoadBMPFromFB( int w, int h );
52 52
53MovieMaker::MovieMaker() 53MovieMaker::MovieMaker()
54{ 54{
55 sprintf( fname, "movie.avi" ); 55 snprintf( fname, sizeof(fname), "movie.avi" ); /* Flawfinder: ignore */
56 width = -1; 56 width = -1;
57 height = -1; 57 height = -1;
58 58
@@ -104,7 +104,8 @@ MovieMaker::~MovieMaker()
104 104
105void MovieMaker::StartCapture( char *name , int x, int y) 105void MovieMaker::StartCapture( char *name , int x, int y)
106{ 106{
107 strcpy( fname, name ); 107 strncpy( fname, name, sizeof(fname) -1 ); /* Flawfinder: ignore */
108 fname[sizeof(fname) -1] = '\0';
108 109
109 // Get the width and height. 110 // Get the width and height.
110 width = x; 111 width = x;
@@ -498,7 +499,7 @@ MovieMaker::~MovieMaker()
498 499
499void MovieMaker::StartCapture( char *name , int x, int y) 500void MovieMaker::StartCapture( char *name , int x, int y)
500{ 501{
501 strncpy( fname, name, sizeof(fname)); 502 strncpy( fname, name, sizeof(fname)); /* Flawfinder: ignore */
502 width = x; 503 width = x;
503 height = y; 504 height = y;
504 505
@@ -577,7 +578,7 @@ OSStatus MovieMaker::setupMovie()
577 if (error == noErr) 578 if (error == noErr)
578 { 579 {
579 // This is stoopid. I have to take the passed full path, create the file so I can get an FSRef, and Get Info to get the FSSpec for QuickTime. Could Apple make this any more difficult... 580 // This is stoopid. I have to take the passed full path, create the file so I can get an FSRef, and Get Info to get the FSSpec for QuickTime. Could Apple make this any more difficult...
580 FILE *file = LLFile::fopen(fname, "w"); 581 FILE* file = LLFile::fopen(fname, "w"); /* Flawfinder: ignore */
581 if (file) 582 if (file)
582 { 583 {
583 fclose(file); 584 fclose(file);