mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Unfortunately `StringSource` class is very easy was very easy to misuse
because the ctor took a plain `std::string_view` which has a bad habit
of being implicitly convertible from an rvalue `std::string`. This lead
to unintentional use-after-free bugs.
This patch makes `StringSource` much harder to misuse by disabling the ctor
from a `std::string &&` (but `const std::string &` is ok).
Fix affected tests from libstore-tests.
Reformat those tests with clangd's range formatting since the diff is tiny
and it seems appropriate.
(cherry picked from commit
|
||
---|---|---|
.. | ||
data | ||
.version | ||
build-utils-meson | ||
common-protocol.cc | ||
content-address.cc | ||
derivation-advanced-attrs.cc | ||
derivation.cc | ||
derived-path.cc | ||
downstream-placeholder.cc | ||
http-binary-cache-store.cc | ||
legacy-ssh-store.cc | ||
local-binary-cache-store.cc | ||
local-overlay-store.cc | ||
local-store.cc | ||
local.mk | ||
machines.cc | ||
meson.build | ||
nar-info-disk-cache.cc | ||
nar-info.cc | ||
nix_api_store.cc | ||
outputs-spec.cc | ||
package.nix | ||
path-info.cc | ||
path.cc | ||
references.cc | ||
s3-binary-cache-store.cc | ||
serve-protocol.cc | ||
ssh-store.cc | ||
store-reference.cc | ||
uds-remote-store.cc | ||
worker-protocol.cc |