aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Greffrath <fabian@greffrath.com>2012-03-03 02:35:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-05-03 00:28:35 +0200
commit7a877418e30b09a724684e5bc8742d864d35e31d (patch)
tree8e6043fc304ea76eff2e6bf810049b663a30c739
parentcf9b04c6f23f4cd544641ebe0fd7371e3653835e (diff)
downloadffmpeg-7a877418e30b09a724684e5bc8742d864d35e31d.tar.gz
srtdec: fix a format string vulnerability.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit aaa1173de775b9b865a714abcc270816d2f59dff)
-rw-r--r--libavcodec/srtdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index aa73f4c7bf..b6f2dade0c 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -110,7 +110,7 @@ static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
for (j=sptr-2; j>=0; j--)
if (stack[j].param[i][0]) {
out += snprintf(out, out_end-out,
- stack[j].param[i]);
+ "%s", stack[j].param[i]);
break;
}
} else {
@@ -146,7 +146,7 @@ static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
for (i=0; i<PARAM_NUMBER; i++)
if (stack[sptr].param[i][0])
out += snprintf(out, out_end-out,
- stack[sptr].param[i]);
+ "%s", stack[sptr].param[i]);
}
} else if (!buffer[1] && strspn(buffer, "bisu") == 1) {
out += snprintf(out, out_end-out,