[FFmpeg-cvslog] mpegts_audio_write: fix potential integer overflow
Michael Niedermayer
git at videolan.org
Sun Jun 3 03:49:20 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 3 03:42:50 2012 +0200| [328e203ca9b5e5afcd0769dae149075735150346] | committer: Michael Niedermayer
mpegts_audio_write: fix potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=328e203ca9b5e5afcd0769dae149075735150346
---
libavformat/mpegtsenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 0a6aa77..9e066de 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -507,7 +507,7 @@ static void section_write_packet(MpegTSSection *s, const uint8_t *packet)
static int mpegts_audio_write(void *opaque, uint8_t *buf, int size)
{
MpegTSWriteStream *ts_st = (MpegTSWriteStream *)opaque;
- if (ts_st->adata_pos + size > ts_st->adata_size)
+ if (ts_st->adata_pos + (int64_t)size > ts_st->adata_size)
return AVERROR(EIO);
memcpy(ts_st->adata + ts_st->adata_pos, buf, size);
More information about the ffmpeg-cvslog
mailing list