@@ -150,6 +150,9 @@ typedef struct {
150150/* Utility functions */
151151/******************************************************************************/
152152
153+ #ifdef __GNUC__
154+ __attribute__((format (printf , 6 , 7 )))
155+ #endif
153156static void PROVIDER_CTX_log (PROVIDER_CTX * prov_ctx , int level , int reason , int line , const char * file , const char * format , ...)
154157{
155158 va_list args ;
@@ -735,13 +738,13 @@ static int store_load(void *ctx, OSSL_CALLBACK *object_cb, void *object_cbarg,
735738 int len = i2d_X509 (cert , NULL );
736739
737740 if (len < 0 ) {
738- PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 4 , OPENSSL_LINE , OPENSSL_FUNC , store_ctx -> uri );
741+ PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 4 , OPENSSL_LINE , OPENSSL_FUNC , "%s" , store_ctx -> uri );
739742 X509_free (cert );
740743 return 0 ;
741744 }
742745 tmp = data = OPENSSL_malloc ((size_t )len );
743746 if (!tmp ) {
744- PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 1 , OPENSSL_LINE , OPENSSL_FUNC , store_ctx -> uri );
747+ PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 1 , OPENSSL_LINE , OPENSSL_FUNC , "%s" , store_ctx -> uri );
745748 X509_free (cert );
746749 return 0 ;
747750 }
@@ -755,7 +758,7 @@ static int store_load(void *ctx, OSSL_CALLBACK *object_cb, void *object_cbarg,
755758
756759 if (!object_cb (params , object_cbarg )) {
757760 /* callback failed */
758- PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 5 , OPENSSL_LINE , OPENSSL_FUNC , store_ctx -> uri );
761+ PROVIDER_CTX_log (store_ctx -> prov_ctx , LOG_ERR , 5 , OPENSSL_LINE , OPENSSL_FUNC , "%s" , store_ctx -> uri );
759762 OPENSSL_free (data );
760763 return 0 ;
761764 }
0 commit comments