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

Size computation for allocation may overflow #703

Closed
wants to merge 1 commit into from

Conversation

lochjin
Copy link
Collaborator

@lochjin lochjin commented May 22, 2024

No description provided.

@lochjin lochjin requested a review from dindinw May 22, 2024 05:32
@@ -152,7 +152,8 @@

func newContext(prefix []interface{}, suffix []interface{}) []interface{} {
normalizedSuffix := normalize(suffix)
newCtx := make([]interface{}, len(prefix)+len(normalizedSuffix))
size := len(prefix) + len(normalizedSuffix)

Check failure

Code scanning / CodeQL

Size computation for allocation may overflow High

This operation, which is used in an
allocation
, involves a
potentially large value
and might overflow.
@@ -230,7 +231,8 @@
type Ctx map[string]interface{}

func (c Ctx) toArray() []interface{} {
arr := make([]interface{}, len(c)*2)
size := len(c) * 2

Check failure

Code scanning / CodeQL

Size computation for allocation may overflow High

This operation, which is used in an
allocation
, involves a
potentially large value
and might overflow.
@lochjin lochjin closed this May 22, 2024
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.

None yet

1 participant