Skip to content

Commit

Permalink
update(libsinsp): handle buflen as int64 and not pointer in filterchecks
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Nov 3, 2023
1 parent 210ab62 commit b2f5c20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions userspace/libsinsp/sinsp_filtercheck_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,17 +612,14 @@ inline uint8_t* sinsp_filter_check_event::extract_buflen(sinsp_evt *evt, OUT uin
{
if(evt->get_direction() == SCAP_ED_OUT)
{
sinsp_evt_param *parinfo;
int64_t retval;

//
// Extract the return value
//
retval = evt->get_param<int64_t>(0);
m_s64val = evt->get_param<int64_t>(0);

if(retval >= 0)
if(m_s64val >= 0)
{
RETURN_EXTRACT_PTR(parinfo->m_val);
RETURN_EXTRACT_VAR(m_s64val);
}
}

Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/sinsp_filtercheck_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class sinsp_filter_check_event : public sinsp_filter_check
bool compare(sinsp_evt *evt);

uint64_t m_u64val;
int64_t m_s64val;
uint64_t m_tsdelta;
uint32_t m_u32val;
std::string m_strstorage;
Expand Down

0 comments on commit b2f5c20

Please sign in to comment.