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(sinsp): guard against uninitialized use #2261

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@
}

void sinsp::print_capture_stats(sinsp_logger::severity sev) const {
scap_stats stats;
scap_stats stats = {};

Check warning on line 1682 in userspace/libsinsp/sinsp.cpp

View check run for this annotation

Codecov / codecov/patch

userspace/libsinsp/sinsp.cpp#L1682

Added line #L1682 was not covered by tests
get_capture_stats(&stats);

libsinsp_logger()->format(
Expand Down Expand Up @@ -1822,7 +1822,7 @@
return;
}

uint32_t nplg;
uint32_t nplg = 0;

Check warning on line 1825 in userspace/libsinsp/sinsp.cpp

View check run for this annotation

Codecov / codecov/patch

userspace/libsinsp/sinsp.cpp#L1825

Added line #L1825 was not covered by tests
*sres = m_input_plugin->get_progress(nplg);

*nres = ((double)nplg) / 100;
Expand Down
Loading