mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
srtdec: fix a format string vulnerability.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit aaa1173de7)
This commit is contained in:
committed by
Michael Niedermayer
parent
c00c380724
commit
c91a14638e
@@ -110,7 +110,7 @@ static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
|
|||||||
for (j=sptr-2; j>=0; j--)
|
for (j=sptr-2; j>=0; j--)
|
||||||
if (stack[j].param[i][0]) {
|
if (stack[j].param[i][0]) {
|
||||||
out += snprintf(out, out_end-out,
|
out += snprintf(out, out_end-out,
|
||||||
stack[j].param[i]);
|
"%s", stack[j].param[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} 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++)
|
for (i=0; i<PARAM_NUMBER; i++)
|
||||||
if (stack[sptr].param[i][0])
|
if (stack[sptr].param[i][0])
|
||||||
out += snprintf(out, out_end-out,
|
out += snprintf(out, out_end-out,
|
||||||
stack[sptr].param[i]);
|
"%s", stack[sptr].param[i]);
|
||||||
}
|
}
|
||||||
} else if (!buffer[1] && strspn(buffer, "bisu") == 1) {
|
} else if (!buffer[1] && strspn(buffer, "bisu") == 1) {
|
||||||
out += snprintf(out, out_end-out,
|
out += snprintf(out, out_end-out,
|
||||||
|
|||||||
Reference in New Issue
Block a user