[MPlayer-dev-eng] possible bug in demux_mov.c

Arpi arpi at thot.banki.hu
Mon Apr 21 21:49:11 CEST 2003


Hi,

> > > In demux_mov.c at line 498 there is a unchecked malloc.
> > > This could probably leed to a segfault.
> > 
> > there are thousands of unchecked mallocs in mplayer source
> > we don't expect to fail allocating few kBs of memory...
> 
> I agree, checking malloc return is nonsense. If there's not enough
> mem, crashing is just as good as printing a fatal error followed by
> 'clean' exit...

also note, that it doesn't even happen on VM systems, as there are 2GB
VM, whiel you have actually a lot less plhisical memory, so your app
will be killed by kernel's OOM before your app gets any error of malloc()
(you can even malloc() 2GB, it will be allocated really when you start use
(address) it, malloc won't fail even if you have only 8MB ram)


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list