Prevent Segmentation Faults in ssh_channel_is_open and ssh_channel_is_closed #239
This commit addresses issue #239 by adding a check to prevent segmentation faults in the ssh_channel_is_open
and ssh_channel_is_closed
functions. The new checks ensure that channel
and channel->session
are not NULL before accessing the alive
member, enhancing the robustness of the code.
Checklist
-
Commits have Signed-off-by:
with name/author being identical to the commit author -
Code modified for feature -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated
Reviewer's checklist:
-
Any issues marked for closing are addressed -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code
Signed-off-by: Ramesh Adhikari adhikari.resume@gmail.com
Edited by Ramesh Adhikari