On Sat Apr 26 15:12:31 2025 +0000, eric pouech wrote:
looks to be that curPos can be > *numRead, hence reading garbage in that case
Line 312 terminates the buffer at *numRead, line 314 sets len to *numRead, and loop at 320 stops when !(curPos < len). Worst case is if curPos == len then we are checking the null terminator.