Merge branch 'faridzakaria/fix-stack-buffer-overflow' of https://github.com/fzakaria/nix
This commit is contained in:
commit
acf381b061
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ void RefScanSink::operator () (std::string_view data)
|
||||||
fragment, so search in the concatenation of the tail of the
|
fragment, so search in the concatenation of the tail of the
|
||||||
previous fragment and the start of the current fragment. */
|
previous fragment and the start of the current fragment. */
|
||||||
auto s = tail;
|
auto s = tail;
|
||||||
s.append(data.data(), refLength);
|
s.append(data.data(), std::min(data.size(), refLength));
|
||||||
search(s, hashes, seen);
|
search(s, hashes, seen);
|
||||||
|
|
||||||
search(data, hashes, seen);
|
search(data, hashes, seen);
|
||||||
|
|
Loading…
Reference in a new issue