-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 SIGSEV crashes by adding NULL pointer checks #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about fi
in macOS? Is it always non-null in fuse 2?
jfuse-api/src/main/java/org/cryptomator/jfuse/api/util/MemoryUtils.java
Outdated
Show resolved
Hide resolved
Also, can you add tests for the new utility methods? |
In fuse 2 the above methods either do not have a file info as parameter or the documentation only mentions the path to be nullable. |
…tils.java Co-authored-by: Sebastian Stenzel <[email protected]>
@overheadhunter Done in c3bb154 |
According to the fuse 3.x documentation, the methods
releasedir
,getattr
,chmod
,chown
,fsyncdir
,truncate
andutimens
can have NULL parameter. Before this PR this was not accounted for, leading to crashes of the JVM.This PR fixes it. If the MemorySegment handed over to the JVM is the NULL-Pointer, the methods translate it to Javas
null
value.