[MPlayer-dev-eng] [PATCH] show ogg subtitle language

Joey Parrish joey at nicewarrior.org
Fri Sep 24 17:08:07 CEST 2004


On Fri, Sep 24, 2004 at 02:55:27AM -0400, D Richard Felker III wrote:
> On Fri, Sep 24, 2004 at 12:49:24AM -0500, Joey Parrish wrote:
> > On Thu, Sep 23, 2004 at 09:21:30PM -0500, Joey Parrish wrote:
> > > Attached is a patch to demux_ogg to cache the subtitle languages and to
> > > main to show them on OSD.  OK to commit?
> > 
> > No!  Not okay!  :)
> > I sent the wrong version, that one didn't compile.  Oops.
> > 
> > Here's the right one.
> 
> ok to commit? depends on if it has buffer overflow vulns (or any other
> sort of string vulns). you'd better be damn careful with code like
> this, but please do double check it and then commit once you're sure
> it's safe. it sounds like a useful feature.

All strings are alloc'd with strdup, printed with snprintf, and the
array of strings is realloc'd a few times, but only during demux_open.
The next version (attached in reply to Moritz) also checks for more than
one language tag and free's memory if need be before strdup to avoid mem
leaks on a malicious file.

--Joey

-- 
Me: "Isn't Kennedy as real as Colonel Sanders?"
Chad: "... Which Kennedy?"




More information about the MPlayer-dev-eng mailing list