format strings
authorUlf Möller <ulf@openssl.org>
Tue, 6 Feb 2001 02:57:35 +0000 (02:57 +0000)
committerUlf Möller <ulf@openssl.org>
Tue, 6 Feb 2001 02:57:35 +0000 (02:57 +0000)
MacOS/GetHTTPS.src/GetHTTPS.cpp
apps/ca.c
apps/ciphers.c
apps/crl.c
apps/sess_id.c
apps/x509.c
crypto/rc4/rc4.c
demos/tunala/tunala.c

index d62dc50473a89a9a5b38a99c41b713dd9538b86f..3a5e3f018615e42a94a03be7ffac44b389b9da4c 100644 (file)
@@ -167,7 +167,7 @@ void main(void)
                
                tempString[bytesRead] = '\0';
                
-               printf(tempString);
+               printf("%s", tempString);
        }
        
        printf("\n\n\n");
@@ -201,7 +201,7 @@ EXITPOINT:
        {
                printf("An error occurred:\n");
                
-               printf(GetErrorMessage());
+               printf("%s",GetErrorMessage());
        }
        
        
index 9c7bac39f01ce10718b469ba5d1e17ab78813c5e..567ef4777cb169dab457ffd1c19334f16809bd64 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -479,7 +479,7 @@ bad:
        if (badops)
                {
                for (pp=ca_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto err;
                }
 
index b6e2f966d86e78d7b01c097ea655fc4932920156..6be76716a8b6b1484bdb0f58c408c1706461c0c2 100644 (file)
@@ -150,7 +150,7 @@ int MAIN(int argc, char **argv)
        if (badops)
                {
                for (pp=ciphers_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto end;
                }
 
index 3b5725f23f2c4335aed373140bd8ed991009e4f4..666a8576fbe73644aaa8560224880dc6ca262b84 100644 (file)
@@ -214,7 +214,7 @@ int MAIN(int argc, char **argv)
                {
 bad:
                for (pp=crl_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto end;
                }
 
index 60cc3f1e496a3d524e9c408f7c9aa99251e76473..eb40aa63538103a805ac0c3d68696f13f58bd9df 100644 (file)
@@ -156,7 +156,7 @@ int MAIN(int argc, char **argv)
                {
 bad:
                for (pp=sess_id_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto end;
                }
 
index 9422e1d15cdef004d915ad272eb5203b5fc3a599..af3843b1f8bcbd098074b48e806159f5f3d29f5e 100644 (file)
@@ -435,7 +435,7 @@ int MAIN(int argc, char **argv)
                {
 bad:
                for (pp=x509_usage; (*pp != NULL); pp++)
-                       BIO_printf(bio_err,*pp);
+                       BIO_printf(bio_err,"%s",*pp);
                goto end;
                }
 
index 709b7aff35aeead1e3f49977490317e028d12686..bfb0a3c1f91f3938b979e8f3511a58b63b2464c2 100644 (file)
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
                {
 bad:
                for (pp=usage; (*pp != NULL); pp++)
-                       fprintf(stderr,*pp);
+                       fprintf(stderr,"%s",*pp);
                exit(1);
                }
 
index 75d312ec9213c81fd81e831914f066426660d907..9c3ff5978b79b0db1b8a033547f24927dcc0c5ee 100644 (file)
@@ -186,14 +186,13 @@ static int usage(const char *errstr, int isunknownarg)
 
 static int err_str0(const char *str0)
 {
-       fprintf(stderr, str0);
-       fprintf(stderr, "\n");
+       fprintf(stderr, "%s\n", str0);
        return 1;
 }
 
-static int err_str1(const char *str0, const char *str1)
+static int err_str1(const char *fmt, const char *str1)
 {
-       fprintf(stderr, str0, str1);
+       fprintf(stderr, fmt, str1);
        fprintf(stderr, "\n");
        return 1;
 }