jerpelea opened a new pull request, #19083: URL: https://github.com/apache/nuttx/pull/19083
## Summary readdir() returned NULL at end-of-directory without ensuring errno was clean. POSIX requires errno to be unchanged at EOF, but the underlying read() path may leave a stale errno value. Callers that follow the POSIX idiom (set errno to 0 before the call, test it after a NULL return), such as readdir_r() and scandir(), then misread this as a readdir() failure. Save errno on entry and restore it on the end-of-directory return so that EOF no longer reports a spurious error, while genuine errors (read() returning a negative value) still propagate. ## Impact RELEASE ## Testing CI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
