[all-commits] [llvm/llvm-project] 5bcda1: [libc] fix line buffered empty file writes
michaelrj-google via All-commits
all-commits at lists.llvm.org
Thu Jun 16 09:55:09 PDT 2022
Author: Michael Jones <michaelrj at google.com>
Date: 2022-06-16 (Thu, 16 Jun 2022)
[libc] fix line buffered empty file writes
Previously, any line buffered write of size 0 would cause an error.
The variable used to track the index of the last newline started at
the size of the write - 1, which underflowed. Now it's handled properly,
and a test has been added to prevent regressions.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D127914
More information about the All-commits