⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@therealbobo
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area plugin-sdk

/area tests

What this PR does / why we need it:

At the moment we lack of an api to push vectors of bytebufs (e.g. a list of PT_IPADDR). This fixes it.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana poiana added kind/feature New feature or request dco-signoff: yes labels Nov 1, 2025
@poiana poiana requested review from ldegio and leogr November 1, 2025 13:05
@poiana poiana added the size/S label Nov 1, 2025
@therealbobo therealbobo force-pushed the support-vector-bytebuf-during-extraction branch from 142fb24 to 3837201 Compare November 1, 2025 13:09
@therealbobo therealbobo force-pushed the support-vector-bytebuf-during-extraction branch from 3837201 to 59fa4c6 Compare November 1, 2025 14:03
@poiana
Copy link

poiana commented Dec 17, 2025

LGTM label has been added.

DetailsGit tree hash: ed3aadd8ed7105a68de72ef418b083eee8216a12

@poiana
Copy link

poiana commented Dec 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leogr, therealbobo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 8c469ea into falcosecurity:main Dec 17, 2025
4 checks passed
{
static_assert(sizeof(typename T::value_type) == 1,
"Buffer container must hold byte-sized elements");
set_value((void*)container.data(), (uint32_t)container.size(), pos,
Copy link
Contributor

@irozzo-1A irozzo-1A Dec 17, 2025

Choose a reason for hiding this comment

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

This method takes a const reference to a container like a vector, but as we cast to a void pointer we violate the const semantic. I see two solutions:

  1. Remove const
  2. Always copy

I suggest not using C-style cast to make the need for the const_cast explicit.

Suggested change
set_value((void*)container.data(), (uint32_t)container.size(), pos,
set_value(static_cast<void*>(container.data()), static_cast<uint32_t>(container.size()), pos,

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants