diff --git a/libcap-ng.spec b/libcap-ng.spec index 42d86c7..a7f53d1 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -96,6 +96,6 @@ make check %attr(0644,root,root) %{_mandir}/man8/* %changelog -* Wed Dec 20 2023 Steve Grubb 0.8.5-1 +* Tue Apr 09 2024 Steve Grubb 0.8.5-1 - New upstream release diff --git a/utils/netcap.c b/utils/netcap.c index b8eef67..277bf06 100644 --- a/utils/netcap.c +++ b/utils/netcap.c @@ -109,9 +109,15 @@ static int collect_process_info(void) fprintf(stderr, "Out of memory\n"); continue; } - } else + } else { text = capng_print_caps_text(CAPNG_PRINT_BUFFER, CAPNG_PERMITTED); + if (text == NULL) { + fprintf(stderr, "Out of memory doing pid %d\n", + pid); + continue; + } + } // Get the effective uid snprintf(buf, 32, "/proc/%d/status", pid);