Skip to content
This repository was archived by the owner on Jul 25, 2019. It is now read-only.
This repository was archived by the owner on Jul 25, 2019. It is now read-only.

[static analysis] Buffer Overflow boundcpy WrongSizeParam #112

@DonnaWuDongxia

Description

@DonnaWuDongxia

The size of the buffer used by Buffer::getArrayBuffer in size, at line 15 of /widl-nanmaster/
test/buffer/buffer.cpp, is not properly verified before writing data to the buffer. This can enable a buffer
overflow attack, using the source buffer that Buffer::getArrayBuffer passes to size, at line 15 of /widl-nanmaster/
test/buffer/buffer.cpp, to overwrite the target buffer.

Code Snippet
File Name /widl-nan-master/test/buffer/buffer.cpp
Method ArrayBuffer Buffer::getArrayBuffer() const {

....
21. memcpy(buf, text, size);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions