mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-05 20:55:47 +03:00
src: check hash init success
Before this patch, SHA2 and SHA1 init function results were cast to `void`. This patch makes sure to verify these values. Also: - exclude an `assert(0)` from release builds in `_libssh2_sha_algo_ctx_init()`. (return error instead) - fix indentation / whitespace Reviewed-by: Michael Buckley Closes #1301
This commit is contained in:
@@ -588,6 +588,7 @@ typedef struct _LIBSSH2_POLLFD {
|
||||
#define LIBSSH2_ERROR_MISSING_USERAUTH_BANNER -50
|
||||
#define LIBSSH2_ERROR_ALGO_UNSUPPORTED -51
|
||||
#define LIBSSH2_ERROR_MAC_FAILURE -52
|
||||
#define LIBSSH2_ERROR_HASH_INIT -53
|
||||
|
||||
/* this is a define to provide the old (<= 1.2.7) name */
|
||||
#define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV
|
||||
|
Reference in New Issue
Block a user