~vcs-imports/libssh/trunk

« back to all changes in this revision

Viewing changes to src/libcrypto.c

  • Committer: Andreas Schneider
  • Date: 2018-11-30 17:47:25 UTC
  • Revision ID: git-v1:cf24048f0251f823625ddde892c3b8de93cefd25
libcrypto: Fix integer comparison in evp_cipher_aead_encrypt()

src/libcrypto.c:773:27: warning: comparison of integer expressions of
different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
[-Wsign-compare] <--[cc]
     if (rc != 1 || outlen != len - aadlen) {
                           ^~
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
770
770
                           &outlen,
771
771
                           (unsigned char *)in + aadlen,
772
772
                           (int)len - aadlen);
773
 
    if (rc != 1 || outlen != len - aadlen) {
 
773
    if (rc != 1 || outlen != (int)len - aadlen) {
774
774
        SSH_LOG(SSH_LOG_WARNING, "EVP_EncryptUpdate failed");
775
775
        return;
776
776
    }