mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
GitFileSystemObjectSink: catch an overflow
This commit is contained in:
parent
a409c1a882
commit
f0329568b5
2 changed files with 22 additions and 0 deletions
|
@ -931,6 +931,8 @@ struct GitFileSystemObjectSinkImpl : GitFileSystemObjectSink
|
|||
++dir;
|
||||
relTargetLeft = relTargetLeft.substr(3);
|
||||
}
|
||||
if (dir == pendingDirs.rend())
|
||||
throw Error("invalid hard link target '%s' for path '%s'", target, path);
|
||||
|
||||
// Look up the remainder of the target, starting at the
|
||||
// top-most `git_treebuilder`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue