Viktor Szakats
5a96f494ee
src: silence compiler warnings 3 (change types)
...
Apply type changes to avoid casts and warnings. In most cases this
means changing to a larger type, usually `size_t` or `ssize_t`.
Change signedness in a few places.
Also introduce new variables to avoid reusing them for multiple
purposes, to avoid casts and warnings.
- add FIXME for public `libssh2_sftp_readdir_ex()` return type.
- fix `_libssh2_mbedtls_rsa_sha2_verify()` to verify if `sig_len`
is large enough.
- fix `_libssh2_dh_key_pair()` in `wincng.c` to return error if
`group_order` input is negative.
Maybe we should also reject zero?
- bump `_libssh2_random()` size type `int` -> `size_t`. Add checks
for WinCNG and OpenSSL to return error if requested more than they
support (`ULONG_MAX`, `INT_MAX` respectively).
- change `_libssh2_ntohu32()` return value `unsigned int` -> `uint32_t`.
- fix `_libssh2_mbedtls_bignum_random()` to check for a negative `top`
input.
- size down `_libssh2_wincng_key_sha_verify()` `hashlen` to match
Windows'.
- fix `session_disconnect()` to limit length of `lang_len`
(to 256 bytes).
- fix bad syntax in an `assert()`.
- add a few `const` to casts.
- `while(1)` -> `for(;;)`.
- add casts that didn't fit into #876 .
- update `docs/HACKING-CRYPTO` with new sizes.
May need review for OS400QC3: /cc @monnerat @jonrumsey
See warning details in the PR's individual commits.
Cherry-picked from #846
Closes #879
2023-03-26 22:42:04 +00:00
..
2009-09-04 02:23:28 +02:00
2015-03-07 11:42:14 +01:00
2016-02-24 23:44:13 +01:00
2022-01-13 15:35:29 +01:00
2015-03-07 11:42:14 +01:00
2023-03-26 22:42:04 +00:00
2023-03-14 13:38:28 +01:00
2023-03-22 02:47:58 +00:00
2009-12-23 09:12:02 +09:00
2009-12-23 09:12:02 +09:00
2009-12-23 09:12:02 +09:00
2019-04-11 10:11:38 -07:00
2009-12-23 09:12:02 +09:00
2009-12-23 09:12:02 +09:00
2009-12-23 09:12:02 +09:00
2019-04-11 10:11:38 -07:00
2009-12-23 09:12:02 +09:00
2014-07-28 23:55:34 +02:00
2014-05-19 10:24:58 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2022-08-09 17:05:35 -07:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-05-19 10:24:58 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2019-08-12 14:23:19 -07:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2016-11-05 21:05:20 +00:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2014-07-28 23:55:34 +02:00
2022-08-16 09:13:51 -07:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2022-01-06 10:06:02 -08:00
2010-05-22 08:30:42 +02:00
2010-10-13 15:24:18 +02:00
2019-02-25 10:06:24 -08:00
2010-05-01 23:49:45 +02:00
2011-04-13 00:11:41 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2014-07-28 23:55:34 +02:00
2014-07-28 23:55:34 +02:00
2014-07-28 23:55:34 +02:00
2009-05-28 14:35:13 +02:00
2009-12-25 10:26:51 +09:00
2009-05-29 14:08:24 +02:00
2009-10-18 03:03:55 +02:00
2011-02-26 10:57:56 +01:00
2009-05-29 10:12:22 +02:00
2009-05-28 19:57:54 +02:00
2010-04-24 23:43:07 +07:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2015-09-21 18:01:23 +01:00
2015-09-21 18:01:23 +01:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 23:11:42 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2020-09-28 17:45:13 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-05-13 22:47:22 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 23:17:04 +02:00
2011-09-09 16:12:04 +02:00
2015-11-02 14:50:15 +01:00
2015-11-02 14:50:15 +01:00
2014-07-28 23:55:34 +02:00
2022-01-06 09:50:58 -08:00
2011-09-09 16:12:04 +02:00
2015-11-02 14:50:15 +01:00
2011-05-13 22:47:22 +02:00
2011-09-09 16:12:04 +02:00
2019-03-20 23:50:42 +01:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2010-05-24 07:05:23 +02:00
2013-04-09 16:25:54 +02:00
2016-03-15 21:55:56 +00:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2014-07-28 23:55:34 +02:00
2010-05-28 17:25:42 +02:00
2014-07-28 23:55:34 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2022-09-29 09:05:34 -07:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2022-01-13 15:35:29 +01:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2022-02-03 10:13:36 -08:00
2011-09-12 15:41:28 +02:00
2014-07-28 23:55:34 +02:00
2022-02-03 10:13:36 -08:00
2011-09-09 16:12:04 +02:00
2013-10-16 23:19:14 +02:00
2011-09-09 16:12:04 +02:00
2015-03-15 12:04:10 +01:00
2022-09-29 09:05:34 -07:00
2011-09-09 16:12:04 +02:00
2011-09-09 16:12:04 +02:00
2023-01-06 10:47:32 -08:00
2018-03-12 21:03:07 +01:00
2011-09-09 16:12:04 +02:00
2015-03-07 11:42:14 +01:00