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

wrong check for mmap result #1

Closed
gocarlos opened this issue Jun 4, 2020 · 2 comments
Closed

wrong check for mmap result #1

gocarlos opened this issue Jun 4, 2020 · 2 comments
Assignees

Comments

@gocarlos
Copy link

gocarlos commented Jun 4, 2020

if (buffer != NULL)
should check for MAP_FAILED not NULL

    On success, mmap() returns a pointer to the mapped area.  On error,
       the value MAP_FAILED (that is, (void *) -1) is returned, and errno is
       set to indicate the cause of the error.
@jvo203
Copy link
Owner

jvo203 commented Jun 7, 2020

Thank you, will correct the code. Please note this is a new v5 under active development. The current full-featured version is still the v4 coded in Rust.

@jvo203 jvo203 self-assigned this Jun 7, 2020
@jvo203
Copy link
Owner

jvo203 commented Jun 8, 2020

Fixed this in main_uWS.cpp as well as similar problems in fits.cpp. Thank you for reporting the issue.

@jvo203 jvo203 closed this as completed Jun 8, 2020
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

2 participants