1
From 20ca827019a72bfacb38e73d0b8590e651818272 Mon Sep 17 00:00:00 2001
2
From: Piotr Kaczuba <p.kaczuba@attika.ath.cx>
3
Date: Mon, 30 May 2011 13:19:35 +0200
4
Subject: [PATCH 5/6] postprocess.c: filter name needs to be double 0 terminated
6
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7
(cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7)
9
libpostproc/postprocess.c | 5 +++--
10
1 files changed, 3 insertions(+), 2 deletions(-)
12
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
13
index dd50daf..eacf262 100644
14
--- a/libpostproc/postprocess.c
15
+++ b/libpostproc/postprocess.c
16
@@ -763,7 +763,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
17
ppMode->maxClippedThreshold= 0.01;
20
- av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
21
+ memset(temp, 0, GET_MODE_BUFFER_SIZE);
22
+ av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
24
av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
26
@@ -819,7 +820,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
29
spaceLeft= p - temp + plen;
30
- if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE){
31
+ if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE - 1){