mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge pull request #13098 from roberth/fix-string-ctor
Fix flake-c out of bounds access
This commit is contained in:
commit
ee59af99f8
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <string>
|
||||
|
||||
#include "nix_api_flake.h"
|
||||
#include "nix_api_flake_internal.hh"
|
||||
#include "nix_api_util.h"
|
||||
|
@ -78,7 +80,7 @@ nix_err nix_flake_reference_and_fragment_from_string(
|
|||
nix_clear_err(context);
|
||||
*flakeReferenceOut = nullptr;
|
||||
try {
|
||||
std::string str(strData, 0, strSize);
|
||||
std::string str(strData, strSize);
|
||||
|
||||
auto [flakeRef, fragment] =
|
||||
nix::parseFlakeRefWithFragment(*fetchSettings->settings, str, parseFlags->baseDirectory, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue