aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Kaczuba <p.kaczuba@attika.ath.cx>2011-05-30 13:19:35 +0200
committerReinhard Tartler <siretart@tauware.de>2011-09-03 07:39:54 +0200
commit20ca827019a72bfacb38e73d0b8590e651818272 (patch)
tree3219261042c64f2d0285157a74d56562dba5944b
parentb37131f798941af1eb88e2d550203bdebb8b4324 (diff)
downloadffmpeg-20ca827019a72bfacb38e73d0b8590e651818272.tar.gz
postprocess.c: filter name needs to be double 0 terminated
Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7)
-rw-r--r--libpostproc/postprocess.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index dd50daf21e..eacf262ccd 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -763,7 +763,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
ppMode->maxClippedThreshold= 0.01;
ppMode->error=0;
- av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
+ memset(temp, 0, GET_MODE_BUFFER_SIZE);
+ av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
@@ -819,7 +820,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
plen= strlen(p);
spaceLeft= p - temp + plen;
- if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE){
+ if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE - 1){
ppMode->error++;
break;
}