8000 handle param type int[2] by roikol · Pull Request #969 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

handle param type int[2] #969

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

Merged
merged 3 commits into from
Aug 30, 2021
Merged

Conversation

roikol
Copy link
Contributor
@roikol roikol commented Aug 29, 2021

No description provided.

10000
@@ -103,6 +103,7 @@ const (
bytesT
u16T
credT
intArrT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly int arr, but int[2] type, right?
A more suitable name will be intArr2T

@@ -94,6 +94,18 @@ func readArgFromBuff(dataBuff io.Reader) (argTag, interface{}, error) {
return argTag, nil, fmt.Errorf("byte array size too big: %d", size)
}
res, err = readByteSliceFromBuff(dataBuff, int(size))
case intArrT:
var intVal int32
var intArray []int32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can define it as [2]int32 type and avoid the loop

rc = save_to_submit_buf(submit_p, (void*)&(args->args[i]), size, type, tag);
}
else if (type == INT_ARR_T) {
rc = save_to_submit_buf(submit_p, (void*)(args->args[i]), size, type, tag);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put this line inside the case INT_ARR_T

@roikol roikol force-pushed the add_int_array_type branch from e41db96 to d7fff3a Compare August 30, 2021 12:56
@yanivagman yanivagman merged commit f184b9e into aquasecurity:main Aug 30, 2021
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.

2 participants
0