crypto/bio/bss_file.c: add missing cast in format arg in ERR_raise_data()

"%s" conversion specifier requires a "char *" argument, so ptr needs
to be cast to it there, as Coverity has noted.

Fixes: ff988500c2 "Replace FUNCerr with ERR_raise_data"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665423
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)
This commit is contained in:
Eugene Syromiatnikov 2025-09-15 04:44:36 +02:00 committed by Neil Horman
parent e321bc27c7
commit fbd5d84d4b
1 changed files with 1 additions and 1 deletions

View File

@ -287,7 +287,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr)
if (fp == NULL) { if (fp == NULL) {
ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(), ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
"calling fopen(%s, %s)", "calling fopen(%s, %s)",
ptr, p); (const char *)ptr, p);
ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB); ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
ret = 0; ret = 0;
break; break;