Fix length calculation

This commit is contained in:
Arun Prakash Jana 2022-12-11 02:53:34 +05:30
parent d4c3e52f2f
commit 608fbb4ad7
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 1 deletions

View File

@ -8573,8 +8573,10 @@ int main(int argc, char *argv[])
DPRINTF_S(arg);
size_t len = xstrlen(arg);
if (len > 7 && is_prefix(arg, "file://", 7))
if (len > 7 && is_prefix(arg, "file://", 7)) {
arg = arg + 7;
len -= 7;
}
initpath = abspath(arg, NULL, NULL);
DPRINTF_S(initpath);
if (!initpath) {