mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-26 01:03:15 +03:00
ssh_channel_read() reads the data into the buffer, but doesn't append a '\0' after it. When the buffer is asserted to be equal to a string further in the test, the assertion could fail if the byte after the data stored in the buffer doesn't contain '\0' (and it mayn't) This commit appends a '\0' after the data read into the buffer before comparing it with a string. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>