Conversation
|
This UB was spotted by Falco zig CI: https://github.com/falcosecurity/falco/actions/runs/11106489185?pr=3307 /milestone 0.19.0 |
userspace/libsinsp/parsers.cpp
Outdated
| } | ||
|
|
||
| if(fdinfo->m_name.back() == '/') { | ||
| if(!fdinfo->m_name.empty() && fdinfo->m_name.back() == '/') { |
There was a problem hiding this comment.
In both fixes, if m_name is empty i return "/"; perhaps it is better to just return the empty string?
There was a problem hiding this comment.
Decided together with @jasondellaluce to just return an empty string in these cases.
|
/hold |
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
…ont` without checking string emptiness. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
bef6c42 to
8a0b548
Compare
|
/unhold |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2088 +/- ##
==========================================
- Coverage 73.58% 73.58% -0.01%
==========================================
Files 253 253
Lines 31869 31869
Branches 5650 5644 -6
==========================================
- Hits 23452 23451 -1
+ Misses 8408 8393 -15
- Partials 9 25 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, jasondellaluce The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: