Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined behaviour: calling close after fdopendir in loadExpressions #228

Closed
fgsch opened this issue Mar 18, 2020 · 0 comments
Closed

Undefined behaviour: calling close after fdopendir in loadExpressions #228

fgsch opened this issue Mar 18, 2020 · 0 comments

Comments

@fgsch
Copy link
Contributor

fgsch commented Mar 18, 2020

 Upon successful return from fdopendir(), the file descriptor is under the
 control of the system, and if any attempt is made to close the file
 descriptor, or to modify the state of the associated description other
 than by means of closedir(), readdir(), readdir_r(), or rewinddir(), the
 behavior is undefined.

Found by coverity.

fgsch added a commit to fgsch/hyperscan that referenced this issue Mar 20, 2020
Just use stat and opendir.  Fixes intel#228.

While here correct the error message.
@Nor7th Nor7th closed this as completed in 55f3367 May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant