diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-21 12:36:58 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-02-22 08:49:52 +0100 |
commit | 7f90026b3fca9cfd3d9098d358d949d37509a2e5 (patch) | |
tree | d91a6f22702f8977560f7ffec75ac0e10e942bc9 /test/cmp_ctx_test.c | |
parent | 4718326a46ad460fefc5cc240a8599af4b5993c7 (diff) | |
download | openssl-new-7f90026b3fca9cfd3d9098d358d949d37509a2e5.tar.gz |
Handle NULL result of ERR_reason_error_string() in some apps
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13920)
Diffstat (limited to 'test/cmp_ctx_test.c')
-rw-r--r-- | test/cmp_ctx_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c index 3ea3013abe..e841f029ce 100644 --- a/test/cmp_ctx_test.c +++ b/test/cmp_ctx_test.c @@ -158,8 +158,8 @@ static int execute_CTX_print_errors_test(OSSL_CMP_CTX_TEST_FIXTURE *fixture) ERR_raise(ERR_LIB_CMP, CMP_R_NULL_ARGUMENT); base_err_msg_size += strlen("NULL_ARGUMENT"); expected_size = base_err_msg_size; - ossl_cmp_add_error_data("data1"); /* should prepend separator " : " */ - expected_size += strlen(" : " "data1"); + ossl_cmp_add_error_data("data1"); /* should prepend separator ":" */ + expected_size += strlen(":" "data1"); ossl_cmp_add_error_data("data2"); /* should prepend separator " : " */ expected_size += strlen(" : " "data2"); ossl_cmp_add_error_line("new line"); /* should prepend separator "\n" */ @@ -169,7 +169,7 @@ static int execute_CTX_print_errors_test(OSSL_CMP_CTX_TEST_FIXTURE *fixture) res = 0; ERR_raise(ERR_LIB_CMP, CMP_R_INVALID_ARGS); - base_err_msg_size = strlen("INVALID_ARGS") + strlen(" : "); + base_err_msg_size = strlen("INVALID_ARGS") + strlen(":"); expected_size = base_err_msg_size; while (expected_size < 4096) { /* force split */ ERR_add_error_txt(STR_SEP, max_str_literal); |