@Hinidu in some places, `MAXPATHL + 1` is used with `xmalloc`. Instead of adding the `+ 1` I use `xmallocz` that has overflow checking.