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

Insecure malloc and memcpy functions used #926

Open
patrickdunsheecubic opened this issue Nov 29, 2023 · 1 comment
Open

Insecure malloc and memcpy functions used #926

patrickdunsheecubic opened this issue Nov 29, 2023 · 1 comment

Comments

@patrickdunsheecubic
Copy link

In a recent audit, testers flagged use of insecure function memcpy and malloc. We were recommended to use memcpy_s and calloc as alternatives, and wanted to pass that recommendation to you all to improve security of the library.

Thank you for your consideration!

@PetteriAimonen
Copy link
Member

Might make sense having it as a compilation option, but memcpy_s is only supported in C11 and I intent to retain C89 support.

Nanopb does not currently use malloc() at all, only realloc().

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

No branches or pull requests

2 participants