]> granicus.if.org Git - openssl/commitdiff
Fix ignored return value warnings.
authorBen Laurie <ben@links.org>
Thu, 21 Feb 2013 18:30:04 +0000 (18:30 +0000)
committerBen Laurie <ben@links.org>
Thu, 21 Feb 2013 18:30:04 +0000 (18:30 +0000)
Not sure why I am getting these now and not before.

engines/ccgost/gost2814789t.c
ssl/s3_cbc.c

index 389ba50370fbaa58dfc23844a435cc765956e587..8b386b4f712d5a1d544d56c6ab6912f48724dcad 100644 (file)
@@ -1573,7 +1573,7 @@ engine_cipher_check:
                                        (unsigned int)ullLeft);
            }
            siglen = 4;
-           EVP_DigestSignFinal(&mctx, bTest, &siglen);
+           OPENSSL_assert(EVP_DigestSignFinal(&mctx, bTest, &siglen));
            EVP_MD_CTX_cleanup(&mctx);
            enlu = (int)tcs[t].ullLen;
            enlf = 0;
index 1db1d8c32a300ad991833dcb5e895d4c77f43dcd..87cdc3b2447ecc1d4eaa5a4878d8a9279aaddc17 100644 (file)
@@ -462,6 +462,7 @@ void ssl3_cbc_digest_record(
        * the hash. */
        unsigned md_length_size = 8;
        char length_is_big_endian = 1;
+       int ret;
 
        /* This is a, hopefully redundant, check that allows us to forget about
         * many possible overflows later in this function. */
@@ -733,8 +734,8 @@ void ssl3_cbc_digest_record(
                EVP_DigestUpdate(&md_ctx, hmac_pad, md_block_size);
                EVP_DigestUpdate(&md_ctx, mac_out, md_size);
                }
-       EVP_DigestFinal(&md_ctx, md_out, &md_out_size_u);
-       if (md_out_size)
+       ret = EVP_DigestFinal(&md_ctx, md_out, &md_out_size_u);
+       if (ret && md_out_size)
                *md_out_size = md_out_size_u;
        EVP_MD_CTX_cleanup(&md_ctx);
        }