diff options
author | Matthias Hopf <mhopf@suse.de> | 2009-01-04 17:21:46 +0000 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2009-01-04 17:21:46 +0000 |
commit | b108d0826de0fc395a0d3eb2e5612a20df6cf334 (patch) | |
tree | 81dae017bc5279fcc72ad10c5e361b672c7a9b9a /src/demuxers/demux_real.c | |
parent | 6310414eccaadf292b3b32a4423ebf5c1e3e7255 (diff) | |
download | xine-lib-b108d0826de0fc395a0d3eb2e5612a20df6cf334.tar.gz xine-lib-b108d0826de0fc395a0d3eb2e5612a20df6cf334.tar.bz2 |
Fix for CVE-2008-5236.
Multiple heap-based buffer overflows in xine-lib 1.1.12, and other
1.1.15 and earlier versions, allow remote attackers to execute
arbitrary code via vectors related to (1) a crafted EBML element
length processed by the parse_block_group function in
demux_matroska.c; (2) a certain combination of sps, w, and h values
processed by the real_parse_audio_specific_data and
demux_real_send_chunk functions in demux_real.c; and (3) an
unspecified combination of three values processed by the open_ra_file
function in demux_realaudio.c. NOTE: vector 2 reportedly exists
because of an incomplete fix in 1.1.15.
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r-- | src/demuxers/demux_real.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 32b516537..965470125 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -359,9 +359,14 @@ static void real_parse_audio_specific_data (demux_real_t *this, * stream->frame_size = stream->w / stream->sps * stream->h * stream->sps; * but it looks pointless? the compiler will probably optimise it away, I suppose? */ - stream->frame_size = stream->w * stream->h; + if (stream->w < 32768 && stream->h < 32768) { + stream->frame_size = stream->w * stream->h; + stream->frame_buffer = calloc(stream->frame_size, 1); + } else { + stream->frame_size = 0; + stream->frame_buffer = NULL; + } - stream->frame_buffer = calloc(stream->frame_size, 1); stream->frame_num_bytes = 0; stream->sub_packet_cnt = 0; |