diff options
author | Muh Muhten <muh.muhten@gmail.com> | 2019-02-07 01:53:09 -0500 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2019-02-20 20:12:52 -0600 |
commit | 85caac44733919105980764a4033bbfdf3a8b77c (patch) | |
tree | e94cc6ef6187cfb79d1e6b694df666219cb27cdb /src/builtin.jq | |
parent | 048acee39babe759d1db0f32f263857c27361746 (diff) |
Work around fgets()'s lack of length reporting
Stop losing \0s from the end of files because we don't know how much
fgets() read into our buffer. If we prefill the buffer with anything
other than zeroes, we can actually tell the difference between the
terminator and unused space in the buffer.
This is possibly more expensive, but at least it should be correct.
Fixes #1504
Diffstat (limited to 'src/builtin.jq')
0 files changed, 0 insertions, 0 deletions