[FFmpeg-cvslog] postprocess.c: filter name needs to be double 0 terminated
Piotr Kaczuba
git at videolan.org
Thu Sep 22 01:17:19 CEST 2011
ffmpeg | branch: release/0.8 | Piotr Kaczuba <p.kaczuba at attika.ath.cx> | Mon May 30 13:19:35 2011 +0200| [20ca827019a72bfacb38e73d0b8590e651818272] | committer: Reinhard Tartler
postprocess.c: filter name needs to be double 0 terminated
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20ca827019a72bfacb38e73d0b8590e651818272
---
libpostproc/postprocess.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index dd50daf..eacf262 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;
}
More information about the ffmpeg-cvslog
mailing list