[MPlayer-dev-eng] [PATCH] vf_screenshot, output filename corresponding to the played file

Ruslan Savchenko ruslan.savchenko at gmail.com
Tue Nov 11 21:27:54 CET 2008


On Tue, Nov 11, 2008 at 6:01 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Mon, Nov 10, 2008 at 03:01:50PM +0300, Ruslan Savchenko wrote:
> > On Mon, Nov 10, 2008 at 11:43 AM, Attila Kinali <attila at kinali.ch>
> wrote:
> >
> > > On Sun, 9 Nov 2008 22:03:07 +0300
> > > "Ruslan Savchenko" <ruslan.savchenko at gmail.com> wrote:
> [...]
>
> > +        priv->fname = malloc(strlen(priv->fnamebase) + strlen(tstamp) +
> 8);
> > +        sprintf(priv->fname, "%s.[%s].png", priv->fnamebase, tstamp);
>
> interger oveflows leading to segfaults or exploits


priv->filename and tstamp occupied the whole address space? I don't believe
it.
Maybe I misunderstand you?


> besides these, i seriously douubt all the *alloc() in this patch is needed
>  <https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng>


Use fixed-length array? What length?



Thank you very much for comments. Attached new patch (merged it with the
patch for mencoder).

-- 
Regards,
Ruslan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_screenshot-filename.patch
Type: application/octet-stream
Size: 5789 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081111/3f4591a0/attachment.obj>


More information about the MPlayer-dev-eng mailing list