Commit 2bbeec17 authored by michael's avatar michael

disallow strcat


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3826 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bdfc66e6
...@@ -500,6 +500,7 @@ tend= rdtsc();\ ...@@ -500,6 +500,7 @@ tend= rdtsc();\
#define rand rand_is_forbidden_due_to_state_trashing #define rand rand_is_forbidden_due_to_state_trashing
#define srand srand_is_forbidden_due_to_state_trashing #define srand srand_is_forbidden_due_to_state_trashing
#define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf #define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
#define strcat strcat_is_forbidden_due_to_security_issues_use_pstrcat
#if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H)) #if !(defined(LIBAVFORMAT_BUILD) || defined(_FRAMEHOOK_H))
#define printf please_use_av_log #define printf please_use_av_log
#define fprintf please_use_av_log #define fprintf please_use_av_log
......
...@@ -55,14 +55,15 @@ rwpipe *rwpipe_open( int argc, char *argv[] ) ...@@ -55,14 +55,15 @@ rwpipe *rwpipe_open( int argc, char *argv[] )
if ( this->pid == 0 ) if ( this->pid == 0 )
{ {
char *command = av_mallocz( 10240 ); #define COMMAND_SIZE 10240
char *command = av_mallocz( COMMAND_SIZE );
int i; int i;
strcpy( command, "" ); strcpy( command, "" );
for ( i = 0; i < argc; i ++ ) for ( i = 0; i < argc; i ++ )
{ {
strcat( command, argv[ i ] ); pstrcat( command, COMMAND_SIZE, argv[ i ] );
strcat( command, " " ); pstrcat( command, COMMAND_SIZE, " " );
} }
dup2( output[ 0 ], STDIN_FILENO ); dup2( output[ 0 ], STDIN_FILENO );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment