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

fix char buff matchargs #770

Merged
merged 2 commits into from
Mar 9, 2023
Merged

fix char buff matchargs #770

merged 2 commits into from
Mar 9, 2023

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Mar 7, 2023

Got the patch from @Y-dc (see #576) and added a test for it.

@kkourt kkourt force-pushed the pr/kkourt/char_buf_matchargs branch 5 times, most recently from 8db372e to 3ed70aa Compare March 7, 2023 18:36
kkourt added 2 commits March 7, 2023 19:40
Strings and buffers are encoded differently, but they do use the same
function for filtering. As a result, filtering buffers did not work.
This patch fixes this by adding a new argument filter_char_buf and
passing the appropriate value for strings and buffers.

The patch also removes an unneeded variable (v). Note that we also change
the bound of length to be <=255 which was the same bound for v (since it
was a char casted into an int).

Signed-off-by: dechengyuan <[email protected]>
Signed-off-by: Kornilios Kourtis <[email protected]>
This patch adds tests for the issue that was fixed in the previous
commit.

Signed-off-by: Kornilios Kourtis <[email protected]>
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

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

nice, I guess the fix goes in through this PR (not #576) , because there's test

@kkourt kkourt marked this pull request as ready for review March 8, 2023 09:39
@kkourt kkourt requested a review from a team as a code owner March 8, 2023 09:39
@kkourt kkourt requested a review from kevsecurity March 8, 2023 09:39
@kkourt
Copy link
Contributor Author

kkourt commented Mar 8, 2023

nice, I guess the fix goes in through this PR (not #576) , because there's test

I think that's easier, yes. I'll wait until the discussion on #576 concludes and then I'll merge this one.

@kkourt kkourt merged commit fb7ee76 into main Mar 9, 2023
@kkourt kkourt deleted the pr/kkourt/char_buf_matchargs branch March 9, 2023 17:26
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