summaryrefslogtreecommitdiffstats
path: root/src/packet1.c
Commit message (Collapse)AuthorAgeFilesLines
* log: Fix log levels.Gangadhar Sandrani2014-04-221-1/+1
| | | | | Signed-off-by: Gangadhar Sandrani <gangadhar.sandrani@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* packet: Do not decrypt zero length rest of bufferAlan Dunn2014-02-061-6/+13
| | | | | | | | | | | | | | | | | | | | | | | If we receive a packet of length exactly blocksize, then packet_decrypt gets called on a buffer of size 0. The check at the beginning of packet_decrypt indicates that the function should be called on buffers of at least one blocksize, though the check allows through zero length. As is packet_decrypt can return -1 when len is 0 because malloc can return NULL in this case: according to the ISO C standard, malloc is free to return NULL or a pointer that can be freed when size == 0, and uclibc by default will return NULL here (in "non-glibc-compatible" mode). The net result is that when using uclibc connections with libssh can anomalously fail. Alternatively, packet_decrypt (and probably packet_encrypt for consistency) could be made to always succeed on len == 0 without depending on the behavior of malloc. Thanks to Josh Berlin for bringing conneciton failures with uclibc to my attention. Signed-off-by: Alan Dunn <amdunn@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* src: Rename buffer_add_data() to ssh_buffer_add_data().Andreas Schneider2014-01-191-1/+1
|
* src: Rename buffer_init to ssh_buffer_init().Andreas Schneider2014-01-191-2/+2
|
* src: Remove enter_function() and leave_function().Andreas Schneider2013-07-141-7/+3
|
* src: Migrate to SSH_LOG.Andreas Schneider2013-07-141-10/+10
|
* src: Add fall trough comments.Andreas Schneider2013-06-181-0/+1
|
* packet1: Don't free an invalid address.Andreas Schneider2013-06-171-1/+0
|
* packet: Make default_packet_handlers static.Andreas Schneider2012-02-191-1/+1
| | | | Fixes sparse warnings.
* build: Fix zlib support.Andreas Schneider2011-09-231-2/+2
|
* build: Fix SSHv1 build.Andreas Schneider2011-09-221-1/+5
|
* priv: Create crc32.h.Andreas Schneider2011-09-181-0/+1
| | | | As crc32 is only needed by SSHv1, build it only with SSHv1.
* SSH1: handle exit-status message (channels would not close)Aris Adamantiadis2011-09-141-1/+1
|
* packet1: Fixed dead assignments.Andreas Schneider2010-12-211-3/+1
| | | | Found by http://test.libssh.org/scan-build/
* build: Fixed build warning on FreeBSD.Andreas Schneider2010-12-201-0/+5
|
* misc: Rename libssh/ to src/Andreas Schneider2010-09-061-0/+362