Andreas Schneider
8a83bc0569
gzip: Use calloc in initcompress() and initdecompress()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 07986731c6 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
0181f5b5ed
kex: Use C99 initializer instead of memset
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit f1608778be )
2018-09-04 20:00:04 +02:00
Andreas Schneider
eaae8ce086
channels: Remove memset in ssh_channel_do_free()
...
We have nice tools to detect that in the meantime.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 72e91d5131 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
0b2072dd30
channels: Reformat ssh_channel_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 4af4b59e21 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
2e77cf6b34
channels: Use calloc() in ssh_channel_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit ca464ca2ba )
2018-09-04 20:00:04 +02:00
Andreas Schneider
ad3c052e1c
channel: Reformat ssh_channel_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 9ac6ac6c26 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
57d9d97866
pki_mbedcrypto: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit b6b5a61c97 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
22747c862a
pki_crypto: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 1acb82e38a )
2018-09-04 20:00:04 +02:00
Andreas Schneider
fed755eee5
getpass: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit a6d59811bb )
2018-09-04 20:00:04 +02:00
Andreas Schneider
804410f8ad
getpass: Use calloc to allocate memory
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit d4a443d56c )
2018-09-04 20:00:04 +02:00
Andreas Schneider
df57a9a81d
wrapper: Use explicit_bzero() in crypto_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 62bff4aff1 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
97076780a5
wrapper: Fix size type
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit f8e68b92b8 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
899553f9f7
wrapper: Reformat crypto_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 9c5d2d4543 )
2018-09-04 20:00:04 +02:00
Andreas Schneider
2edff5e69e
tests: Add a test for sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 7867126aa6 )
2018-09-04 19:00:50 +02:00
Andreas Schneider
37f451171b
sftp: Fix segfault in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 4774d2b9f7 )
2018-09-04 19:00:47 +02:00
Andreas Schneider
2efc1721d8
string: Don't allow to allocate strings bigger than 256M
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit f48dcb26e3 )
2018-09-04 12:29:41 +02:00
Andreas Schneider
e9613e6b52
string: Reformat ssh_string_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit d1f23cd6d8 )
2018-09-04 12:29:40 +02:00
Andreas Schneider
73fbe68ccd
sftp: Use ssh_buffer_pack() in sftp_fstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit e601dbd8e3 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
0cb282df99
sftp: Reformat sftp_lstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit f3ffd8aa41 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
fdb0c0a29b
sftp: Use ssh_buffer_pack() in sftp_xstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 4d98b1cd7e )
2018-09-03 19:04:13 +02:00
Andreas Schneider
2e56db3b2f
sftp: Reformat sftp_xstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit b00a0578f9 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
4eb759bf40
sftp: Use ssh_buffer_unpack() in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 336c097ae7 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
c3987a9796
sftp: Use ssh_buffer_pack() in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 1dd8466f66 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
a070c942e7
sftp: Reformat sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8b19ef05f3 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
113b1872cf
sftp: Use sftp_buffer_pack() in sftp_fstatvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 7e11e41a9f )
2018-09-03 19:04:13 +02:00
Andreas Schneider
c7dc2937fc
sftp: Reformat sftp_fstatvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 5914ea7c75 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
075895da40
sftp: Use ssh_buffer_pack() in sftp_fsync()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit f1e84d5e67 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
7930086a37
sftp: Use ssh_buffer_pack() in sftp_statvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8e3dd09e11 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
3f376f848d
sftp: Reformat sftp_statvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit ae0afec98d )
2018-09-03 19:04:13 +02:00
Andreas Schneider
3cee61a65b
sftp: Use ssh_buffer_unpack() in sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 0be43c333e )
2018-09-03 19:04:13 +02:00
Andreas Schneider
90321f732e
sftp: Use ssh_buffer_pack() in sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 83a5d3b258 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
c6140b1a4c
sftp: Reformat sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit bb4bdec184 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
9290d89570
sftp: Use ssh_buffer_pack() in sftp_setstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit e0449ba21f )
2018-09-03 19:04:13 +02:00
Andreas Schneider
da9ab71f88
sftp: Reformat sftp_setstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8a56b90c3e )
2018-09-03 19:04:13 +02:00
Andreas Schneider
53dfee98d2
sftp: Use ssh_buffer_pack() in sftp_mkdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 218c67a51d )
2018-09-03 19:04:13 +02:00
Andreas Schneider
bb14611f86
sftp: Reformat sftp_mkdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 89c525bbf1 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
b1aca92268
sftp: Use ssh_buffer_pack in sftp_open()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 2c0baef7d4 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
2b524655ae
sftp: Reformat sftp_open()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit bfb6718b50 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
b51594c34a
sftp: Use ssh_buffer_pack() in sftp_handle_close()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit d99c066a0b )
2018-09-03 19:04:13 +02:00
Andreas Schneider
b409b7d092
sftp: Reformat sftp_handle_close()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 2844942c1b )
2018-09-03 19:04:13 +02:00
Andreas Schneider
4256936fed
sftp: Use ssh_buffer_pack() in sftp_readdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 3a729829fd )
2018-09-03 19:04:13 +02:00
Andreas Schneider
fdb6dc7069
sftp: Reformat sftp_readdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 576fdbe1e8 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
6291900234
sftp: Use ssh_buffer_pack() in sftp_opendir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 87df9cfc5d )
2018-09-03 19:04:13 +02:00
Andreas Schneider
216bd2abd8
sftp: Reformat sftp_opendir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit ea375d1605 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
574f279f00
buffer: Precalculate the size required for ssh_buffer_pack()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit c15bd2831f )
2018-09-03 19:04:13 +02:00
Andreas Schneider
d886870bbf
buffer: Only reduce the buffer size if it gets bigger than 64K
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit efef877356 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
f56c93cccd
buffer: Only allow to allocate a maximum of 256MB
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 254a0f7132 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
bbd17bc97a
buffer: Always preallocate a buffer with 64 bytes
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit d2131b286f )
2018-09-03 19:04:13 +02:00
Andreas Schneider
26fa923b55
buffer: Rewrite ssh_buffer_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit c1c32bda14 )
2018-09-03 19:04:13 +02:00
Andreas Schneider
177a082974
buffer: Use bool for secure buffer
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit a1b57d3b94 )
2018-09-03 19:04:13 +02:00