aboutsummaryrefslogtreecommitdiff
path: root/libpostproc
diff options
context:
space:
mode:
authorPiotr Kaczuba2011-05-30 13:19:35 +0200
committerReinhard Tartler2011-08-26 20:28:54 +0200
commitf4f3300c09bb13eb7922e60888b55e3e0fb325e7 (patch)
tree40f75032bb32d40e33e521facf4a1362b2f5dbe5 /libpostproc
parent0249478756091ab62f2d68f4d25f6b095f6723d8 (diff)
postprocess.c: filter name needs to be double 0 terminated
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libpostproc')
-rw-r--r--libpostproc/postprocess.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index ca6d85f4a0..fb51d942e5 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -731,7 +731,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);
@@ -787,7 +788,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;
}