[MPlayer-dev-eng] [PATCH 1/3] Add mp_dir_join function.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 29 13:51:18 CET 2011


On Sun, Jan 23, 2011 at 08:46:26PM +0100, Clément Bœsch wrote:
> +    int dirlen = strlen(dir);
> +    int i      = dirlen - 1;


> +    if (i < 0 || dir[i] == '/')

I do not know if it really matters, but dirlen can be < 0.
I can even be 0 on 64 bit systems without dir being an empty
string.
Returning NULL should be ok in these cases, but I do not
know if whatever the current code ends up doing is ok.


More information about the MPlayer-dev-eng mailing list