Commit 04477ade authored by Robert Pluim's avatar Robert Pluim

Check that length of data returned by sysctl is non-zero

The length of the data returned by sysctl can be zero, which was not
checked for.  This could cause crashes, e.g. when querying
non-existent processes.  (Bug#36279)

* src/sysdep.c (list_system_processes) [DARWIN_OS || __FreeBSD__]:
(system_process_attributes) [__FreeBSD__]:
(system_process_attributes) [DARWIN_OS]:
* src/filelock.c (get_boot_time) [CTL_KERN && KERN_BOOTTIME]: Check
  for zero length data returned by sysctl.
parent 81535eea
Pipeline #2184 passed with stage
in 26 minutes and 41 seconds