From: Havoc Pennington Date: Thu, 10 Jun 2010 20:28:52 +0000 (-0400) Subject: Allocate space for null terminator in param_apply_tune X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=71502eaf1ac591074da1f16135cc4af4087a9f3f;p=x264.git Allocate space for null terminator in param_apply_tune --- diff --git a/common/common.c b/common/common.c index a5bc7469..97daf529 100644 --- a/common/common.c +++ b/common/common.c @@ -281,7 +281,7 @@ static int x264_param_apply_preset( x264_param_t *param, const char *preset ) static int x264_param_apply_tune( x264_param_t *param, const char *tune ) { - char *tmp = x264_malloc( strlen( tune ) ); + char *tmp = x264_malloc( strlen( tune ) + 1 ); if( !tmp ) return -1; tmp = strcpy( tmp, tune );