]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/bio/bss_file.c: add missing cast in format arg in ERR_raise_data()
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 15 Sep 2025 02:44:36 +0000 (04:44 +0200)
committerNeil Horman <nhorman@openssl.org>
Tue, 16 Sep 2025 13:41:38 +0000 (09:41 -0400)
"%s" conversion specifier requires a "char *" argument, so ptr needs
to be cast to it there, as Coverity has noted.

Fixes: ff988500c2f39 "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)

crypto/bio/bss_file.c

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