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

Fix filehandle corruption on LP64 #345

Merged
merged 2 commits into from
Mar 25, 2022

Conversation

manu0401
Copy link
Contributor

Do not take for granted that __WORDSIZE is defined to distinguish between 32 and 64 bit platforms. If undefined on LP64 machine, STRUCT_TO_FILEHANDLE corrupts the filehande.

Instead use ULONG_MAX from <limits.h> which is mandated by ISO C99.

Do not take for granted that __WORDSIZE is defined to distinguish
between 32 and 64 bit platforms. If undefined on LP64 machine,
STRUCT_TO_FILEHANDLE corrupts the filehande.

Instead use ULONG_MAX from <limits.h> which is mandated by ISO C99.
Copy link
Member

@lucasvr lucasvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for catching this one!

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 24, 2022
This includes two fixes submitted upstream:
LinearTapeFileSystem/ltfs#346
LinearTapeFileSystem/ltfs#345

While there, update the message about NetBSD requirement to drop
informations about now unsupported releases, and require NetBSD >= 8.0
@piste2750 piste2750 self-assigned this Mar 25, 2022
Copy link
Member

@piste2750 piste2750 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe no bad side effect at all.

@piste2750
Copy link
Member

Thank you for your patch. Merging.

@piste2750 piste2750 merged commit 98e8854 into LinearTapeFileSystem:master Mar 25, 2022
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.

3 participants