Unexpected EOF handling
Kurt Roeckx
kurt at roeckx.be
Thu May 7 13:45:08 UTC 2020
On Thu, May 07, 2020 at 03:15:22PM +0200, Tomas Mraz wrote:
>
> Actually the coincidence is that the errno is set to 0 on EOF. So yes,
> we should explicitly clear the errno on EOF so any leftover value from
> previous calls does not affect this.
On EOF, errno is normally not modified. It's value is not defined
if no error is returned. It is not guaranteed to be 0 on success
or EOF. It can be modified, because the implementation might have
done other system calls that did return an error. But a simple test
shows that it's not modified on my system.
Kurt
More information about the openssl-project
mailing list