fix: Limit memory allocation by MAX_CRYPTO_DATA_SIZE #2766
Closed
Mergeable / Mergeable
succeeded
Sep 16, 2024 in 1s
3 checks passed!
Status: PASS
Details
✔️ Validator: TITLE
- ✔️ All the requisite validations passed for 'or' option
Input : fix: Limit memory allocation by MAX_CRYPTO_DATA_SIZE
Settings :{"or":[{"must_include":{"regex":"^(feat|docs|chore|cleanup|fix|refactor|test|style|perf)(\\(\\w+\\))?:\\ .+$","message":"Semantic release conventions must be followed."}},{"must_include":{"regex":"^Bump [^ ]* from [^ ]* to [^ ]*$","message":"Dependabot PRs are exempt from semantic release conventions."}}]}
✔️ Validator: COMMIT
- ✔️ Your commit messages met the specified criteria
Input : fix: Limit memory allocation by MAX_CRYPTO_DATA_SIZE,fix: Remove size check as we do not know it,fix: better overflow protection.
Settings :{"do":"commit","message":{"regex":"^((feat|docs|chore|cleanup|fix|refactor|test|style|perf)(\\(\\w+\\))?:\\ .+|Bump [^ ]* from [^ ]* to [^ ]*)","message":"Semantic release conventions must be followed."}}
✔️ Validator: DESCRIPTION
- ✔️ description must exclude '\[ \]'
Input : This PR is intended to fix the issue, when shiny object is shown to the camera during the call. In this scenario camera creates big frames, for which toxcore tries to allocate memory and if the frame is big enough, it may fail, resulting in overflow error.
In this fix we limit the allocation size to MAX_CRYPTO_DATA_SIZE
and, limit the frame size to UINT16_MAX
(we use length_safe
instead of length
variable).
I have tested the fix on qTox client.
See issue
Settings : {"must_exclude":{"regex":"\\\\[ \\\\]","message":"There are incomplete TODO task(s) unchecked."}}
Loading