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