-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
src/freon.c mishandles 3rd arg to open functions (mode) #3140
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the
open
signature is:int open(const char *pathname, int flags, ...);
and
mode
is only passed in for certain flags (O_CREAT
andO_TMPFILE
), so trying to extract it otherwise is undefined behavior. you might get garbage, or you might crash.freon.c assumes it's always passed in:
same for
open64
.you can do something instead like:
The text was updated successfully, but these errors were encountered: