| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64770 +/- ##
==========================================
- Coverage 90.14% 90.13% -0.01%
==========================================
Files 744 744
Lines 242518 242519 +1
Branches 45685 45685
==========================================
- Hits 218611 218599 -12
- Misses 15396 15406 +10
- Partials 8511 8514 +3
... and 32 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Mkdtemp() allocated the template buffer as `length + strlen("XXXXXX")`,
leaving no room for the terminating NUL byte. For a single-byte prefix
long enough to force the heap allocation path (length + 6 > the
stack-buffer threshold), the terminating NUL was written one byte past
the end of the buffer -- a 1-byte heap-buffer-overflow flagged by
AddressSanitizer.
Allocate room for the terminating NUL, copy the suffix, and use
SetLengthAndZeroTerminate to set the correct length and write the
terminator, following the MaybeStackBuffer paradigm used elsewhere in
this file.
Signed-off-by: frandle331-yh <s1240100@gmail.com>
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
It looks like the macOS CI failed due to a timeout in parallel/test-debugger-break, which seems unrelated to my fs.mkdtemp changes (likely a flaky test). |
Sorry, something went wrong.
Sorry, something went wrong.
|
It looks like the CI failed again (node-test-commit, etc.), but I don't have permission to view the Jenkins logs. |
Sorry, something went wrong.
Sorry, something went wrong.
Mkdtemp() allocated the template buffer as `length + strlen("XXXXXX")`,
leaving no room for the terminating NUL byte. For a single-byte prefix
long enough to force the heap allocation path (length + 6 > the
stack-buffer threshold), the terminating NUL was written one byte past
the end of the buffer -- a 1-byte heap-buffer-overflow flagged by
AddressSanitizer.
Allocate room for the terminating NUL, copy the suffix, and use
SetLengthAndZeroTerminate to set the correct length and write the
terminator, following the MaybeStackBuffer paradigm used elsewhere in
this file.
Signed-off-by: frandle331-yh <s1240100@gmail.com>
PR-URL: #64770
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Mkdtemp() allocated the template buffer as `length + strlen("XXXXXX")`,
leaving no room for the terminating NUL byte. For a single-byte prefix
long enough to force the heap allocation path (length + 6 > the
stack-buffer threshold), the terminating NUL was written one byte past
the end of the buffer -- a 1-byte heap-buffer-overflow flagged by
AddressSanitizer.
Allocate room for the terminating NUL, copy the suffix, and use
SetLengthAndZeroTerminate to set the correct length and write the
terminator, following the MaybeStackBuffer paradigm used elsewhere in
this file.
Signed-off-by: frandle331-yh <s1240100@gmail.com>
PR-URL: #64770
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
| Back | FazBrowse Home | New Git URL |
Mkdtemp() allocated the template buffer as length + strlen("XXXXXX"),
leaving no room for the terminating NUL byte that snprintf() writes. For
a single-byte prefix long enough to force the heap allocation path
(length + 6 > the stack-buffer threshold), snprintf() wrote the six 'X'
characters plus its NUL one byte past the end of the buffer -- a 1-byte
heap-buffer-overflow flagged by AddressSanitizer.
Allocate one extra byte for the NUL terminator, matching the + 1
already used by the sibling allocations in the same file.
Signed-off-by: frandle331-yh s1240100@gmail.com