From: Joshua Rogers Date: Fri, 10 Oct 2025 16:58:22 +0000 (+0800) Subject: Correct error code in raise in bio_zstd/brotli_flush() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=604d926abb875a88bef80eda4268390a3c7982d0;p=thirdparty%2Fopenssl.git Correct error code in raise in bio_zstd/brotli_flush() Signed-off-by: Joshua Rogers Reviewed-by: Matt Caswell Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/28839) --- diff --git a/crypto/comp/c_brotli.c b/crypto/comp/c_brotli.c index ab71c2ac60a..0475297a9ac 100644 --- a/crypto/comp/c_brotli.c +++ b/crypto/comp/c_brotli.c @@ -685,7 +685,7 @@ static int bio_brotli_flush(BIO *b) brret = BrotliEncoderCompressStream(ctx->encode.state, BROTLI_OPERATION_FINISH, &ctx->encode.avail_in, (const uint8_t**)&ctx->encode.next_in, &ctx->encode.avail_out, &ctx->encode.next_out, NULL); if (brret != BROTLI_TRUE) { - ERR_raise(ERR_LIB_COMP, COMP_R_BROTLI_DECODE_ERROR); + ERR_raise(ERR_LIB_COMP, COMP_R_BROTLI_ENCODE_ERROR); ERR_add_error_data(1, "brotli encoder error"); return 0; } diff --git a/crypto/comp/c_zstd.c b/crypto/comp/c_zstd.c index 840ec7af493..a4f82d2c3de 100644 --- a/crypto/comp/c_zstd.c +++ b/crypto/comp/c_zstd.c @@ -732,7 +732,7 @@ static int bio_zstd_flush(BIO *b) /* Compress some more */ zret = ZSTD_flushStream(ctx->compress.state, &ctx->compress.outbuf); if (ZSTD_isError(zret)) { - ERR_raise(ERR_LIB_COMP, COMP_R_ZSTD_DECODE_ERROR); + ERR_raise(ERR_LIB_COMP, COMP_R_ZSTD_COMPRESS_ERROR); ERR_add_error_data(1, ZSTD_getErrorName(zret)); return 0; }