Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix print_supported_protocols and print_supported_protocols_usage
These were broken in 7cb8996, when the empty sentinel value at the end of the array was removed, without changing the way these functions iterate over that array. For some reason, this continues to work on Linux (probably due to `calloc` allocating more zeroed bytes than we request, in `openconnect_get_supported_protocols`), but is causing the expected SIGSEGV on Solaris: https://lists.infradead.org/pipermail/openconnect-devel/2020-April/005640.html Fix: - Modify `print_supported_protocols` and `print_supported_protocols_usage` to rely on the length returned by `openconnect_get_supported_protocols`. - Restore the sentinel value at the end of the array returned by `openconnect_get_supported_protocols`, to preserve ABI compatibility for other users who may depend on this sentinel. Signed-off-by: Daniel Lenski <dlenski@gmail.com>
- Loading branch information