Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kaczuba <p.kaczuba@attika.ath.cx>2011-05-30 15:19:35 +0400
committerReinhard Tartler <siretart@tauware.de>2011-11-05 16:18:31 +0400
commit7487d53d0144043a462a5d54d766478ce64f0daa (patch)
tree80701e1ec6e4556101b7f092a0affd78cafa2431 /libpostproc/postprocess.c
parent21ad6e08e45952586441e5fb7b0cf670ba021718 (diff)
postprocess.c: filter name needs to be double 0 terminated
Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7) (cherry picked from commit 20ca827019a72bfacb38e73d0b8590e651818272) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libpostproc/postprocess.c')
-rw-r--r--libpostproc/postprocess.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 4810353085..d2dc6bcae1 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -767,7 +767,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);
@@ -823,7 +824,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;
}