Skip to content

Fix: NO_CAST.INTEGER_OVERFLOW - #553

Open
samitistfobos-dev wants to merge 1 commit into
linux-audit:masterfrom
samitistfobos-dev:fix/552-array-nextsize-overflow
Open

samitistfobos-dev wants to merge 1 commit into
linux-audit:masterfrom
samitistfobos-dev:fix/552-array-nextsize-overflow

Conversation

@samitistfobos-dev

Copy link
Copy Markdown

Problem:
The value of an arithmetic expression 'elem * ncur' is a subject to overflow because its operands are not cast to a larger data type before performing arithmetic

Solution: Use a long variable for byte-size calculations in array_nextsize instead of performing the multiplication using int values. This avoids signed integer overflow in both the size comparison and the subsequent size calculation.
Signed-off-by: a.burlakov@fobos-nt.ru
Signed-off-by: dinchik@altlinux.org

Problem:
The value of an arithmetic expression 'elem * ncur' is a subject to overflow because its operands are not cast to a larger data type before performing arithmetic

Solution: Use a long variable for byte-size calculations in array_nextsize instead of performing the multiplication using int values. This avoids signed integer overflow in both the size comparison and the subsequent size calculation.
Signed-off-by: a.burlakov@fobos-nt.ru
Signed-off-by: dinchik@altlinux.org
@samitistfobos-dev

Copy link
Copy Markdown
Author

Patch for #552

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant