diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-03 03:42:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-03 03:43:40 +0200 |
commit | 328e203ca9b5e5afcd0769dae149075735150346 (patch) | |
tree | 46d23caefb16267d308b25330f139ec95b5794f8 /libavformat | |
parent | f67309cabe27af33dcfcfb61fe1df39af9b5ab46 (diff) | |
download | ffmpeg-streaming-328e203ca9b5e5afcd0769dae149075735150346.zip ffmpeg-streaming-328e203ca9b5e5afcd0769dae149075735150346.tar.gz |
mpegts_audio_write: fix potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegtsenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |