diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2015-09-25 00:34:42 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2015-10-12 13:56:21 +0200 |
commit | d1de73c7aaa65b2a137ada57b479d5a42e4c212f (patch) | |
tree | e1796b2137d3c6553dfbb4bf6af9aef7889f2d9d /src/packet1.c | |
parent | c12915e5037fe37fabf17126e57f08e5c4a49971 (diff) | |
download | libssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.tar.gz libssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.tar.xz libssh-d1de73c7aaa65b2a137ada57b479d5a42e4c212f.zip |
buffer: do not use ssh_buffer_get_rest_len()
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's
just use the first one. This is a preparatory step for removing
ssh_buffer_get_rest_len().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'src/packet1.c')
-rw-r--r-- | src/packet1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/packet1.c b/src/packet1.c index 94652045..25fc44be 100644 --- a/src/packet1.c +++ b/src/packet1.c @@ -185,7 +185,7 @@ int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user ssh_buffer_get_len(session->in_buffer)); #endif SSH_LOG(SSH_LOG_PACKET, "%d bytes padding", padding); - if(((len + padding) != ssh_buffer_get_rest_len(session->in_buffer)) || + if(((len + padding) != ssh_buffer_get_len(session->in_buffer)) || ((len + padding) < sizeof(uint32_t))) { SSH_LOG(SSH_LOG_RARE, "no crc32 in packet"); ssh_set_error(session, SSH_FATAL, "no crc32 in packet"); |