[MPlayer-dev-eng] [PATCH] one line patch to add codecs subdir to searchpath
114263 at vs.iki.fi
Fri Feb 25 23:42:13 CET 2005
On Fri, Feb 25, 2005 at 08:06:46PM +0100, Gianluigi Tiesi wrote:
> I've not tested on linux, but it shouldn't make problems,
> on windows it permits a cleaner directory struct for mplayer.
This looks suspicious:
> + sprintf(tmppath,"%s;%s/codecs", tmppath, win32path);
You are overwriting the same variable that you are using as input.
This is likely to encounter the tmppath's terminating null before
overwriting it, but sprintf is not guaranteed to behave that way
and the result may be an infinite memory-trashing loop in the
A safer and faster equivalent would be:
sprintf(tmppath+strlen(tmppath), ";%s/codecs", win32path);
More information about the MPlayer-dev-eng