-
Notifications
You must be signed in to change notification settings - Fork 165
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(libsinsp): avoid setting a null event pointer when returning SCAP… #1738
Conversation
userspace/libsinsp/sinsp.cpp
Outdated
@@ -1202,8 +1202,9 @@ int32_t sinsp::next(OUT sinsp_evt **puevt) | |||
{ | |||
if (m_external_event_processor) | |||
{ | |||
m_external_event_processor->process_event(NULL, libsinsp::EVENT_RETURN_EOF); | |||
m_external_event_processor->process_event(evt, libsinsp::EVENT_RETURN_EOF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1423 didn't touch these lines? I see that this code is there since ~3yrs at least; a quick blame showed that: https://github.com/falcosecurity/libs/blame/682a4a9ea917dabff8df75bd739ee446a940251e/userspace/libsinsp/sinsp.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. That's not needed.
0bd6330
to
fadaa42
Compare
…_EOF in sinsp::next Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
fadaa42
to
883b4aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: bf76dcd738c7e95f64556604ff81ca8805291db6
|
/milestone 0.15.0 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, jasondellaluce, mrgian The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…_EOF in sinsp::next
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Avoids a possible segfault in applications expecting a valid event pointer when
SCAP_EOF
is reached (e.g. oss-sysdig),like it was before #1423 .
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: