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

null pointer dereference in Gnatcoll.Email.Parser.Full_Parse_From_File #99

Open
Rombobeorn opened this issue Mar 2, 2025 · 0 comments

Comments

@Rombobeorn
Copy link

Full_Parse_From_File raises Constraint_Error if the specified file doesn't exist or the user lacks permission to read it. Constraint_Error can be many things, and the error message "gnatcoll-email-parser.adb:351 access check failed" doesn't tell the user what the problem is.

Doing checks before calling Full_Parse_From_File is not the solution. That would be a race condition.

To be able to give an accurate error message I have to avoid Full_Parse_From_File, write my own code to open and read the file, and call Full_Parse instead. Thus the existence of Full_Parse_From_File is pointless.

Full_Parse_From_File should raise a more specific exception if Read_File returns null.

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

No branches or pull requests

1 participant