[MPlayer-dev-eng] [PATCH] Add mp_strings.c with mp_asprintf function.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 17 21:08:32 CET 2011


On Wed, Jan 12, 2011 at 11:44:32PM +0100, Clément Bœsch wrote:
> I just made a small equivalent to the GNU asprintf function (since I
> suppose it's not available on all system supported by mplayer) in order to
> use it in a few places instead of fixed size buffers like BUFLENGTH in
> some vo (jpeg, png, …) and maybe a few other PATH_MAX we were speaking a
> while ago.

Well, I wonder which case you think is worth the effort.
PATH_MAX + stack isn't so great but it's not such a big issue, and
actually it may be a smaller issue that using this method and ending up
bringing the PC to its knees swapping because someone by accident gave a 2GB
file as playlist and MPlayer tries to actually use a 2GB string as file name...


More information about the MPlayer-dev-eng mailing list