Commit 2da72fb2 by yorah

fileops: fix invalid read

parent 4878ea45
...@@ -320,7 +320,7 @@ int git_futils_mkdir( ...@@ -320,7 +320,7 @@ int git_futils_mkdir(
min_root_len = git_path_root(make_path.ptr); min_root_len = git_path_root(make_path.ptr);
if (root < min_root_len) if (root < min_root_len)
root = min_root_len; root = min_root_len;
while (make_path.ptr[root] == '/') while (root >= 0 && make_path.ptr[root] == '/')
++root; ++root;
/* clip root to make_path length */ /* clip root to make_path length */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment