Skip to content

out-of-bounds array access #129

Description

@Apostol-Alin

I have run a verification using the semgrep formal verification tool (https://semgrep.dev/) and discovered this issue at src\engine\core\src\os\os_unix.cpp:

The preceding call to 'read'can return a negative value when an error is encountered. This can lead to an out-of-bounds array access and possible memory corruption. Details: https://sg.run 112┆ buffer[bytesRead] = 0;

This can be an issue and a possible fix could be to check if the previous read call was succesful before assigning.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions