Segmentation fault in tests/Watchfd_-_Multiple_descriptors.test on macOS

The "tests/Watchfd_-_Multiple_descriptors.test" check fails with a segmentation fault on macOS, for pv 1.9.24 and 1.9.15.

(Reported by eborisch)

The "tests/Watchfd_-_Multiple_descriptors.test" check fails with a segmentation fault on macOS, for pv 1.9.24 and 1.9.15. (Reported by [eborisch](https://github.com/eborisch/))

This was due to a bounds check not being performed in src/pv/watchpid.c, on the fd_to_idx[] array - in the macOS-specific code, fd_infos[i].proc_fd can sometimes be a very large integer. Corrected in a-j-wood/pv@74c75d36cc.

This was due to a bounds check not being performed in _src/pv/watchpid.c_, on the **fd_to_idx[]** array - in the macOS-specific code, **fd_infos[i].proc_fd** can sometimes be a very large integer. Corrected in https://codeberg.org/a-j-wood/pv/commit/74c75d36ccdf322d30ce0927d93d234d3542f541.

Sign in to join this conversation.