diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/moviemaker.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/moviemaker.cpp | 9 |
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 | ||
53 | MovieMaker::MovieMaker() | 53 | MovieMaker::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 | ||
105 | void MovieMaker::StartCapture( char *name , int x, int y) | 105 | void 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 | ||
499 | void MovieMaker::StartCapture( char *name , int x, int y) | 500 | void 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); |