aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorIan Johnson <ian@ianjohnson.dev>2023-08-17 07:52:46 -0400
committerGitHub <noreply@github.com>2023-08-17 07:52:46 -0400
commitf3f554b9b89cc39cf00b4df68bd3455e8ef34984 (patch)
tree819fed8d1bd38c4d6ce10dbdf1cc3def7aec5636 /src/Module.zig
parent5395c2786a2ea9fd70e8c91aab099976216089aa (diff)
downloadzig-f3f554b9b89cc39cf00b4df68bd3455e8ef34984.tar.gz
zig-f3f554b9b89cc39cf00b4df68bd3455e8ef34984.zip
std.json: avoid stale pointers when parsing Value (#16864)
Closes #16861 Using `alloc_if_needed` when parsing a `Value` allows receiving a token which points to the buffer of the underlying `Reader`. This token will no longer be valid after the `Reader`'s buffer is refilled, which will happen with large values. Using `alloc_always` avoids this issue by ensuring the returned tokens always own their data independently of the underlying buffer.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions