[FFmpeg-devel] [PATCH] Check before division in RealMedia demuxer

Roberto Togni rxt
Fri Jun 6 23:56:16 CEST 2008


On Sun, 1 Jun 2008 17:33:31 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> On Sun, Jun 01, 2008 at 10:38:47AM +0200, Panagiotis Issaris wrote:
> > Hi,
> >
> > In the RealMedia demuxer a division is performed using a value read in from 
> > input. In issue 473 this causes an arithmetic exception.
> 
> I think the validity of sub_packet_size should be tested where it is
> read not where it is used
> 

This should do it (untested, I don't have the broken file).

It can't be checked exactly where it's read from the file, because sps
is not used for all codecs. The value is in the track header (MDPR), so
it can't change during playback.


Ciao,
 Roebrto

-- 
Better is the enemy of good enough.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rmdec.c.sps.diff
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080606/93fe9ae9/attachment.bin>



More information about the ffmpeg-devel mailing list