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

FuseNode, Handle is not checked on c++ side #2919

Open
NickKhalow opened this issue Nov 29, 2024 · 0 comments
Open

FuseNode, Handle is not checked on c++ side #2919

NickKhalow opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
3-low Low importance / Nice to have bug Something isn't working new Issues to triage

Comments

@NickKhalow
Copy link
Collaborator

Issue Description:

hMmfOutput is not checked that may lead to memory miss writes and cause crash of the program. It's not critical because FuseNode is designed to be killed when it reaches memory limit and FuseNode is autolaunched on the managed side.

FuseNode\main.cpp

    printf("Opening files\n");
    HANDLE hMmfInput = OpenFileMapping(FILE_MAP_READ, FALSE, InputFileAddress);
    if (!hMmfInput)
    {
        fprintf(stderr, "Error on opening input file: %d", GetLastError());
        return 1;
    }

    HANDLE hMmfOutput = OpenFileMapping(FILE_MAP_WRITE, FALSE, OutputFileAddress);
    if (!hMmfInput)
    {
        fprintf(stderr, "Error on opening input file: %d", GetLastError());
        return 1;
    }
    printf("Files are opened successfully\n");
@NickKhalow NickKhalow added bug Something isn't working 3-low Low importance / Nice to have labels Nov 29, 2024
@NickKhalow NickKhalow self-assigned this Nov 29, 2024
@github-actions github-actions bot added the new Issues to triage label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3-low Low importance / Nice to have bug Something isn't working new Issues to triage
Projects
None yet
Development

No branches or pull requests

1 participant