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

FAPI: Fix file io if d_type of dirent is not supported. #2928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JuergenReppSIT
Copy link
Member

It is not guaranteed that d-type of the structure dirent contains the type of a file entry. It is possible that d_type has the value DT_UNKNOWN or d_type is not supported at all.
To fix this problem, the functions is_regular_file and is_directory are defined.
Fixes #2927

src/tss2-fapi/ifapi_io.c Fixed Show fixed Hide fixed
src/tss2-fapi/ifapi_io.c Fixed Show fixed Hide fixed
It is not guaranteed that d-type of the structure dirent contains the
type of a file entry. It is possible that d_type has the value DT_UNKNOWN
or d_type is not supported at all.
To fix this problem, the functions is_regular_file and is_directory are
defined.
Fixes tpm2-software#2927

Signed-off-by: Juergen Repp <juergen_repp@web.de>
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 this pull request may close these issues.

scandir() on XFS file system
1 participant