Matthew Booth wrote:
On 26/10/09 09:20, Richard W.M. Jones wrote:
> +char *
> +do_case_sensitive_path (const char *path)
> +{
> + char ret[PATH_MAX+1] = "/";
Is PATH_MAX on Windows <= POSIX PATH_MAX? Does ntfs_3g honour this?
Seems like a grey area. It would be safer to realloc this buffer as
necessary. You also wouldn't need the strdup() at the end.
Good point.
There's another reason to avoid using PATH_MAX:
some systems don't define it at all,
and others define it to an outrageously (for stack use) large value.