diff options
author | guenther <> | 2014-04-19 11:46:39 +0000 |
---|---|---|
committer | guenther <> | 2014-04-19 11:46:39 +0000 |
commit | f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0 (patch) | |
tree | 1c4f9b095801061d57e575e80f245cef8a59a27f /src | |
parent | 597610ccf04bbca4e88fac7988877d0a06e02211 (diff) | |
download | openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.tar.gz openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.tar.bz2 openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.zip |
We'll interpret a (void) cast on snprintf() to mean it's been verified that
truncation is either desirable, not an issue, or is detected and handled later
ok deraadt@
Diffstat (limited to 'src')
55 files changed, 147 insertions, 147 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index 856aaf0c77..f331bff320 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
@@ -244,7 +244,7 @@ ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day, | |||
244 | s->data = (unsigned char *)p; | 244 | s->data = (unsigned char *)p; |
245 | } | 245 | } |
246 | 246 | ||
247 | (void) snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900, | 247 | snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900, |
248 | ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec); | 248 | ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec); |
249 | s->length = strlen(p); | 249 | s->length = strlen(p); |
250 | s->type = V_ASN1_GENERALIZEDTIME; | 250 | s->type = V_ASN1_GENERALIZEDTIME; |
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index 5a909d6ae2..6528161c41 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -150,14 +150,14 @@ ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
150 | 150 | ||
151 | if ((minsize > 0) && (nchar < minsize)) { | 151 | if ((minsize > 0) && (nchar < minsize)) { |
152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); | 152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
153 | (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 153 | snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
154 | ERR_add_error_data(2, "minsize=", strbuf); | 154 | ERR_add_error_data(2, "minsize=", strbuf); |
155 | return -1; | 155 | return -1; |
156 | } | 156 | } |
157 | 157 | ||
158 | if ((maxsize > 0) && (nchar > maxsize)) { | 158 | if ((maxsize > 0) && (nchar > maxsize)) { |
159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); | 159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
160 | (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 160 | snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
161 | ERR_add_error_data(2, "maxsize=", strbuf); | 161 | ERR_add_error_data(2, "maxsize=", strbuf); |
162 | return -1; | 162 | return -1; |
163 | } | 163 | } |
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c index 7dc531a2d8..e92c166303 100644 --- a/src/lib/libcrypto/asn1/a_strex.c +++ b/src/lib/libcrypto/asn1/a_strex.c | |||
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
125 | if(c > 0xffffffffL) | 125 | if(c > 0xffffffffL) |
126 | return -1; | 126 | return -1; |
127 | if(c > 0xffff) { | 127 | if(c > 0xffff) { |
128 | (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); | 128 | snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); |
129 | if(!io_ch(arg, tmphex, 10)) return -1; | 129 | if(!io_ch(arg, tmphex, 10)) return -1; |
130 | return 10; | 130 | return 10; |
131 | } | 131 | } |
132 | if(c > 0xff) { | 132 | if(c > 0xff) { |
133 | (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); | 133 | snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); |
134 | if(!io_ch(arg, tmphex, 6)) return -1; | 134 | if(!io_ch(arg, tmphex, 6)) return -1; |
135 | return 6; | 135 | return 6; |
136 | } | 136 | } |
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
149 | return 2; | 149 | return 2; |
150 | } | 150 | } |
151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { | 151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { |
152 | (void) snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp); | 152 | snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp); |
153 | if(!io_ch(arg, tmphex, 3)) return -1; | 153 | if(!io_ch(arg, tmphex, 3)) return -1; |
154 | return 3; | 154 | return 3; |
155 | } | 155 | } |
diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c index a2325f2525..0120b952b3 100644 --- a/src/lib/libcrypto/asn1/a_utctm.c +++ b/src/lib/libcrypto/asn1/a_utctm.c | |||
@@ -205,7 +205,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | |||
205 | s->data=(unsigned char *)p; | 205 | s->data=(unsigned char *)p; |
206 | } | 206 | } |
207 | 207 | ||
208 | (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, | 208 | snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, |
209 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 209 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
210 | s->length=strlen(p); | 210 | s->length=strlen(p); |
211 | s->type=V_ASN1_UTCTIME; | 211 | s->type=V_ASN1_UTCTIME; |
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 49d650b125..86cfdd3967 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c | |||
@@ -467,8 +467,8 @@ asn1_add_error(const unsigned char *address, int offset) | |||
467 | { | 467 | { |
468 | char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1]; | 468 | char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1]; |
469 | 469 | ||
470 | (void) snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address); | 470 | snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address); |
471 | (void) snprintf(buf2, sizeof buf2, "%d", offset); | 471 | snprintf(buf2, sizeof buf2, "%d", offset); |
472 | ERR_add_error_data(4, "address=", buf1, " offset=", buf2); | 472 | ERR_add_error_data(4, "address=", buf1, " offset=", buf2); |
473 | } | 473 | } |
474 | 474 | ||
diff --git a/src/lib/libcrypto/asn1/asn1_par.c b/src/lib/libcrypto/asn1/asn1_par.c index 064b3dcb22..8085d1e570 100644 --- a/src/lib/libcrypto/asn1/asn1_par.c +++ b/src/lib/libcrypto/asn1/asn1_par.c | |||
@@ -85,13 +85,13 @@ asn1_print_info(BIO *bp, int tag, int xclass, int constructed, | |||
85 | 85 | ||
86 | p = str; | 86 | p = str; |
87 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) | 87 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) |
88 | (void) snprintf(str, sizeof str, "priv [ %d ] ", tag); | 88 | snprintf(str, sizeof str, "priv [ %d ] ", tag); |
89 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) | 89 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) |
90 | (void) snprintf(str, sizeof str, "cont [ %d ]", tag); | 90 | snprintf(str, sizeof str, "cont [ %d ]", tag); |
91 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) | 91 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) |
92 | (void) snprintf(str, sizeof str, "appl [ %d ]", tag); | 92 | snprintf(str, sizeof str, "appl [ %d ]", tag); |
93 | else if (tag > 30) | 93 | else if (tag > 30) |
94 | (void) snprintf(str, sizeof str, "<ASN1 %d>", tag); | 94 | snprintf(str, sizeof str, "<ASN1 %d>", tag); |
95 | else | 95 | else |
96 | p = ASN1_tag2str(tag); | 96 | p = ASN1_tag2str(tag); |
97 | 97 | ||
diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index 61c9fe20a3..740686c957 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c | |||
@@ -108,14 +108,14 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
108 | for (i = 0; i < rows; i++) { | 108 | for (i = 0; i < rows; i++) { |
109 | buf[0] = '\0'; /* start with empty string */ | 109 | buf[0] = '\0'; /* start with empty string */ |
110 | strlcpy(buf, str, sizeof buf); | 110 | strlcpy(buf, str, sizeof buf); |
111 | (void) snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); | 111 | snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); |
112 | strlcat(buf, tmp, sizeof buf); | 112 | strlcat(buf, tmp, sizeof buf); |
113 | for (j = 0; j < dump_width; j++) { | 113 | for (j = 0; j < dump_width; j++) { |
114 | if (((i*dump_width) + j) >= len) { | 114 | if (((i*dump_width) + j) >= len) { |
115 | strlcat(buf, " ", sizeof buf); | 115 | strlcat(buf, " ", sizeof buf); |
116 | } else { | 116 | } else { |
117 | ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff; | 117 | ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff; |
118 | (void) snprintf(tmp, sizeof tmp, "%02x%c", ch, | 118 | snprintf(tmp, sizeof tmp, "%02x%c", ch, |
119 | j == 7 ? '-' : ' '); | 119 | j == 7 ? '-' : ' '); |
120 | strlcat(buf, tmp, sizeof buf); | 120 | strlcat(buf, tmp, sizeof buf); |
121 | } | 121 | } |
@@ -125,7 +125,7 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
125 | if (((i*dump_width) + j) >= len) | 125 | if (((i*dump_width) + j) >= len) |
126 | break; | 126 | break; |
127 | ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; | 127 | ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; |
128 | (void) snprintf(tmp, sizeof tmp, "%c", | 128 | snprintf(tmp, sizeof tmp, "%c", |
129 | ((ch >= ' ') && (ch <= '~')) ? ch : '.'); | 129 | ((ch >= ' ') && (ch <= '~')) ? ch : '.'); |
130 | strlcat(buf, tmp, sizeof buf); | 130 | strlcat(buf, tmp, sizeof buf); |
131 | } | 131 | } |
@@ -137,7 +137,7 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
137 | } | 137 | } |
138 | #ifdef TRUNCATE | 138 | #ifdef TRUNCATE |
139 | if (trc > 0) { | 139 | if (trc > 0) { |
140 | (void) snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n", | 140 | snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n", |
141 | str, len + trc); | 141 | str, len + trc); |
142 | ret += cb((void *)buf, strlen(buf), u); | 142 | ret += cb((void *)buf, strlen(buf), u); |
143 | } | 143 | } |
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index a82c79a1b0..a6dd43f397 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -543,7 +543,7 @@ BIO_accept(int sock, char **addr) | |||
543 | goto end; | 543 | goto end; |
544 | } | 544 | } |
545 | *addr = p; | 545 | *addr = p; |
546 | (void) snprintf(*addr, nl, "%s:%s", h, s); | 546 | snprintf(*addr, nl, "%s:%s", h, s); |
547 | goto end; | 547 | goto end; |
548 | } while (0); | 548 | } while (0); |
549 | #endif | 549 | #endif |
@@ -558,7 +558,7 @@ BIO_accept(int sock, char **addr) | |||
558 | } | 558 | } |
559 | *addr = p; | 559 | *addr = p; |
560 | } | 560 | } |
561 | (void) snprintf(*addr, 24, "%d.%d.%d.%d:%d", | 561 | snprintf(*addr, 24, "%d.%d.%d.%d:%d", |
562 | (unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff, | 562 | (unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff, |
563 | (unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port); | 563 | (unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port); |
564 | 564 | ||
diff --git a/src/lib/libcrypto/bio/bio_cb.c b/src/lib/libcrypto/bio/bio_cb.c index a272bf969a..133d2b77dc 100644 --- a/src/lib/libcrypto/bio/bio_cb.c +++ b/src/lib/libcrypto/bio/bio_cb.c | |||
@@ -76,62 +76,62 @@ BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, | |||
76 | if (BIO_CB_RETURN & cmd) | 76 | if (BIO_CB_RETURN & cmd) |
77 | r = ret; | 77 | r = ret; |
78 | 78 | ||
79 | (void) snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio); | 79 | snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio); |
80 | p = &(buf[14]); | 80 | p = &(buf[14]); |
81 | p_maxlen = sizeof buf - 14; | 81 | p_maxlen = sizeof buf - 14; |
82 | switch (cmd) { | 82 | switch (cmd) { |
83 | case BIO_CB_FREE: | 83 | case BIO_CB_FREE: |
84 | (void) snprintf(p, p_maxlen, "Free - %s\n", bio->method->name); | 84 | snprintf(p, p_maxlen, "Free - %s\n", bio->method->name); |
85 | break; | 85 | break; |
86 | case BIO_CB_READ: | 86 | case BIO_CB_READ: |
87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
88 | (void) snprintf(p, p_maxlen, | 88 | snprintf(p, p_maxlen, |
89 | "read(%d,%lu) - %s fd=%d\n", | 89 | "read(%d,%lu) - %s fd=%d\n", |
90 | bio->num, (unsigned long)argi, | 90 | bio->num, (unsigned long)argi, |
91 | bio->method->name, bio->num); | 91 | bio->method->name, bio->num); |
92 | else | 92 | else |
93 | (void) snprintf(p, p_maxlen, "read(%d,%lu) - %s\n", | 93 | snprintf(p, p_maxlen, "read(%d,%lu) - %s\n", |
94 | bio->num, (unsigned long)argi, bio->method->name); | 94 | bio->num, (unsigned long)argi, bio->method->name); |
95 | break; | 95 | break; |
96 | case BIO_CB_WRITE: | 96 | case BIO_CB_WRITE: |
97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
98 | (void) snprintf(p, p_maxlen, | 98 | snprintf(p, p_maxlen, |
99 | "write(%d,%lu) - %s fd=%d\n", | 99 | "write(%d,%lu) - %s fd=%d\n", |
100 | bio->num, (unsigned long)argi, | 100 | bio->num, (unsigned long)argi, |
101 | bio->method->name, bio->num); | 101 | bio->method->name, bio->num); |
102 | else | 102 | else |
103 | (void) snprintf(p, p_maxlen, "write(%d,%lu) - %s\n", | 103 | snprintf(p, p_maxlen, "write(%d,%lu) - %s\n", |
104 | bio->num, (unsigned long)argi, bio->method->name); | 104 | bio->num, (unsigned long)argi, bio->method->name); |
105 | break; | 105 | break; |
106 | case BIO_CB_PUTS: | 106 | case BIO_CB_PUTS: |
107 | (void) snprintf(p, p_maxlen, | 107 | snprintf(p, p_maxlen, |
108 | "puts() - %s\n", bio->method->name); | 108 | "puts() - %s\n", bio->method->name); |
109 | break; | 109 | break; |
110 | case BIO_CB_GETS: | 110 | case BIO_CB_GETS: |
111 | (void) snprintf(p, p_maxlen, "gets(%lu) - %s\n", | 111 | snprintf(p, p_maxlen, "gets(%lu) - %s\n", |
112 | (unsigned long)argi, bio->method->name); | 112 | (unsigned long)argi, bio->method->name); |
113 | break; | 113 | break; |
114 | case BIO_CB_CTRL: | 114 | case BIO_CB_CTRL: |
115 | (void) snprintf(p, p_maxlen, "ctrl(%lu) - %s\n", | 115 | snprintf(p, p_maxlen, "ctrl(%lu) - %s\n", |
116 | (unsigned long)argi, bio->method->name); | 116 | (unsigned long)argi, bio->method->name); |
117 | break; | 117 | break; |
118 | case BIO_CB_RETURN|BIO_CB_READ: | 118 | case BIO_CB_RETURN|BIO_CB_READ: |
119 | (void) snprintf(p, p_maxlen, "read return %ld\n", ret); | 119 | snprintf(p, p_maxlen, "read return %ld\n", ret); |
120 | break; | 120 | break; |
121 | case BIO_CB_RETURN|BIO_CB_WRITE: | 121 | case BIO_CB_RETURN|BIO_CB_WRITE: |
122 | (void) snprintf(p, p_maxlen, "write return %ld\n", ret); | 122 | snprintf(p, p_maxlen, "write return %ld\n", ret); |
123 | break; | 123 | break; |
124 | case BIO_CB_RETURN|BIO_CB_GETS: | 124 | case BIO_CB_RETURN|BIO_CB_GETS: |
125 | (void) snprintf(p, p_maxlen, "gets return %ld\n", ret); | 125 | snprintf(p, p_maxlen, "gets return %ld\n", ret); |
126 | break; | 126 | break; |
127 | case BIO_CB_RETURN|BIO_CB_PUTS: | 127 | case BIO_CB_RETURN|BIO_CB_PUTS: |
128 | (void) snprintf(p, p_maxlen, "puts return %ld\n", ret); | 128 | snprintf(p, p_maxlen, "puts return %ld\n", ret); |
129 | break; | 129 | break; |
130 | case BIO_CB_RETURN|BIO_CB_CTRL: | 130 | case BIO_CB_RETURN|BIO_CB_CTRL: |
131 | (void) snprintf(p, p_maxlen, "ctrl return %ld\n", ret); | 131 | snprintf(p, p_maxlen, "ctrl return %ld\n", ret); |
132 | break; | 132 | break; |
133 | default: | 133 | default: |
134 | (void) snprintf(p, p_maxlen, | 134 | snprintf(p, p_maxlen, |
135 | "bio callback - unknown type (%d)\n", cmd); | 135 | "bio callback - unknown type (%d)\n", cmd); |
136 | break; | 136 | break; |
137 | } | 137 | } |
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index fca5d5e853..45815fd696 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c | |||
@@ -482,7 +482,7 @@ conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
482 | char buf[16]; | 482 | char buf[16]; |
483 | unsigned char *p = ptr; | 483 | unsigned char *p = ptr; |
484 | 484 | ||
485 | (void) snprintf(buf, sizeof buf, "%d.%d.%d.%d", | 485 | snprintf(buf, sizeof buf, "%d.%d.%d.%d", |
486 | p[0], p[1], p[2], p[3]); | 486 | p[0], p[1], p[2], p[3]); |
487 | if (data->param_hostname != NULL) | 487 | if (data->param_hostname != NULL) |
488 | free(data->param_hostname); | 488 | free(data->param_hostname); |
@@ -491,7 +491,7 @@ conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
491 | } else if (num == 3) { | 491 | } else if (num == 3) { |
492 | char buf[DECIMAL_SIZE(int) + 1]; | 492 | char buf[DECIMAL_SIZE(int) + 1]; |
493 | 493 | ||
494 | (void) snprintf(buf, sizeof buf, "%d", | 494 | snprintf(buf, sizeof buf, "%d", |
495 | *(int *)ptr); | 495 | *(int *)ptr); |
496 | if (data->param_port != NULL) | 496 | if (data->param_port != NULL) |
497 | free(data->param_port); | 497 | free(data->param_port); |
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c index e2cab2497f..49efbcb9a9 100644 --- a/src/lib/libcrypto/bn/bn_print.c +++ b/src/lib/libcrypto/bn/bn_print.c | |||
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a) | |||
147 | /* We now have a series of blocks, BN_DEC_NUM chars | 147 | /* We now have a series of blocks, BN_DEC_NUM chars |
148 | * in length, where the last one needs truncation. | 148 | * in length, where the last one needs truncation. |
149 | * The blocks need to be reversed in order. */ | 149 | * The blocks need to be reversed in order. */ |
150 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); | 150 | snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); |
151 | while (*p) p++; | 151 | while (*p) p++; |
152 | while (lp != bn_data) | 152 | while (lp != bn_data) |
153 | { | 153 | { |
154 | lp--; | 154 | lp--; |
155 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); | 155 | snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); |
156 | while (*p) p++; | 156 | while (*p) p++; |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -367,10 +367,10 @@ char *BN_options(void) | |||
367 | { | 367 | { |
368 | init++; | 368 | init++; |
369 | #ifdef BN_LLONG | 369 | #ifdef BN_LLONG |
370 | (void) snprintf(data,sizeof data,"bn(%d,%d)", | 370 | snprintf(data,sizeof data,"bn(%d,%d)", |
371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); | 371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); |
372 | #else | 372 | #else |
373 | (void) snprintf(data,sizeof data,"bn(%d,%d)", | 373 | snprintf(data,sizeof data,"bn(%d,%d)", |
374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); | 374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); |
375 | #endif | 375 | #endif |
376 | } | 376 | } |
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index 26aee50a45..5ab995a5c0 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -435,7 +435,7 @@ err: | |||
435 | if (buff != NULL) BUF_MEM_free(buff); | 435 | if (buff != NULL) BUF_MEM_free(buff); |
436 | if (section != NULL) free(section); | 436 | if (section != NULL) free(section); |
437 | if (line != NULL) *line=eline; | 437 | if (line != NULL) *line=eline; |
438 | (void) snprintf(btmp,sizeof btmp,"%ld",eline); | 438 | snprintf(btmp,sizeof btmp,"%ld",eline); |
439 | ERR_add_error_data(2,"line ",btmp); | 439 | ERR_add_error_data(2,"line ",btmp); |
440 | if ((h != conf->data) && (conf->data != NULL)) | 440 | if ((h != conf->data) && (conf->data != NULL)) |
441 | { | 441 | { |
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index 2417086537..af33451844 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c | |||
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value, | |||
233 | { | 233 | { |
234 | char rcode[DECIMAL_SIZE(ret)+1]; | 234 | char rcode[DECIMAL_SIZE(ret)+1]; |
235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); | 235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); |
236 | (void) snprintf(rcode, sizeof rcode, "%-8d", ret); | 236 | snprintf(rcode, sizeof rcode, "%-8d", ret); |
237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); | 237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); |
238 | } | 238 | } |
239 | } | 239 | } |
diff --git a/src/lib/libcrypto/cversion.c b/src/lib/libcrypto/cversion.c index 7ecfaf9f2f..326216d084 100644 --- a/src/lib/libcrypto/cversion.c +++ b/src/lib/libcrypto/cversion.c | |||
@@ -67,7 +67,7 @@ SSLeay_version(int t) | |||
67 | #ifdef DATE | 67 | #ifdef DATE |
68 | static char buf[sizeof(DATE) + 11]; | 68 | static char buf[sizeof(DATE) + 11]; |
69 | 69 | ||
70 | (void) snprintf(buf, sizeof buf, "built on: %s", DATE); | 70 | snprintf(buf, sizeof buf, "built on: %s", DATE); |
71 | return (buf); | 71 | return (buf); |
72 | #else | 72 | #else |
73 | return("built on: date not available"); | 73 | return("built on: date not available"); |
@@ -77,7 +77,7 @@ SSLeay_version(int t) | |||
77 | #ifdef CFLAGS | 77 | #ifdef CFLAGS |
78 | static char buf[sizeof(CFLAGS) + 11]; | 78 | static char buf[sizeof(CFLAGS) + 11]; |
79 | 79 | ||
80 | (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); | 80 | snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); |
81 | return (buf); | 81 | return (buf); |
82 | #else | 82 | #else |
83 | return("compiler: information not available"); | 83 | return("compiler: information not available"); |
@@ -87,7 +87,7 @@ SSLeay_version(int t) | |||
87 | #ifdef PLATFORM | 87 | #ifdef PLATFORM |
88 | static char buf[sizeof(PLATFORM) + 11]; | 88 | static char buf[sizeof(PLATFORM) + 11]; |
89 | 89 | ||
90 | (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM); | 90 | snprintf(buf, sizeof buf, "platform: %s", PLATFORM); |
91 | return (buf); | 91 | return (buf); |
92 | #else | 92 | #else |
93 | return("platform: information not available"); | 93 | return("platform: information not available"); |
diff --git a/src/lib/libcrypto/des/ecb_enc.c b/src/lib/libcrypto/des/ecb_enc.c index b83fca71db..f357333b97 100644 --- a/src/lib/libcrypto/des/ecb_enc.c +++ b/src/lib/libcrypto/des/ecb_enc.c | |||
@@ -97,7 +97,7 @@ const char *DES_options(void) | |||
97 | size="int"; | 97 | size="int"; |
98 | else | 98 | else |
99 | size="long"; | 99 | size="long"; |
100 | (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, | 100 | snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, |
101 | size); | 101 | size); |
102 | init=0; | 102 | init=0; |
103 | } | 103 | } |
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c index d5d9a16bf2..a007685111 100644 --- a/src/lib/libcrypto/engine/eng_padlock.c +++ b/src/lib/libcrypto/engine/eng_padlock.c | |||
@@ -177,7 +177,7 @@ padlock_bind_helper(ENGINE *e) | |||
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | /* Generate a nice engine name with available features */ | 179 | /* Generate a nice engine name with available features */ |
180 | (void) snprintf(padlock_name, sizeof(padlock_name), | 180 | snprintf(padlock_name, sizeof(padlock_name), |
181 | "VIA PadLock (%s, %s)", | 181 | "VIA PadLock (%s, %s)", |
182 | padlock_use_rng ? "RNG" : "no-RNG", | 182 | padlock_use_rng ? "RNG" : "no-RNG", |
183 | padlock_use_ace ? "ACE" : "no-ACE"); | 183 | padlock_use_ace ? "ACE" : "no-ACE"); |
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 0672477cc8..c4192c6bfa 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
@@ -842,13 +842,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len) | |||
842 | rs=ERR_reason_error_string(e); | 842 | rs=ERR_reason_error_string(e); |
843 | 843 | ||
844 | if (ls == NULL) | 844 | if (ls == NULL) |
845 | (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | 845 | snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); |
846 | if (fs == NULL) | 846 | if (fs == NULL) |
847 | (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); | 847 | snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); |
848 | if (rs == NULL) | 848 | if (rs == NULL) |
849 | (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); | 849 | snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); |
850 | 850 | ||
851 | (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, | 851 | snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, |
852 | fs?fs:fsbuf, rs?rs:rsbuf); | 852 | fs?fs:fsbuf, rs?rs:rsbuf); |
853 | if (strlen(buf) == len-1) | 853 | if (strlen(buf) == len-1) |
854 | { | 854 | { |
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c index 7374c0abe7..be4d5de2d2 100644 --- a/src/lib/libcrypto/err/err_prn.c +++ b/src/lib/libcrypto/err/err_prn.c | |||
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), | |||
79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
80 | { | 80 | { |
81 | ERR_error_string_n(l, buf, sizeof buf); | 81 | ERR_error_string_n(l, buf, sizeof buf); |
82 | (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, | 82 | snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, |
83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); | 83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); |
84 | if (cb(buf2, strlen(buf2), u) <= 0) | 84 | if (cb(buf2, strlen(buf2), u) <= 0) |
85 | break; /* abort outputting the error report */ | 85 | break; /* abort outputting the error report */ |
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index b3388b117d..cc007f1206 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
594 | } | 594 | } |
595 | else | 595 | else |
596 | { | 596 | { |
597 | (void) snprintf(tbuf,sizeof tbuf,".%lu",l); | 597 | snprintf(tbuf,sizeof tbuf,".%lu",l); |
598 | i=strlen(tbuf); | 598 | i=strlen(tbuf); |
599 | if (buf && (buf_len > 0)) | 599 | if (buf && (buf_len > 0)) |
600 | { | 600 | { |
diff --git a/src/lib/libcrypto/pem/pem_pkey.c b/src/lib/libcrypto/pem/pem_pkey.c index a3b609b2f3..c8cf00dd87 100644 --- a/src/lib/libcrypto/pem/pem_pkey.c +++ b/src/lib/libcrypto/pem/pem_pkey.c | |||
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | |||
147 | (char *)kstr, klen, | 147 | (char *)kstr, klen, |
148 | cb, u); | 148 | cb, u); |
149 | 149 | ||
150 | (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); | 150 | snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); |
151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, | 151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, |
152 | pem_str,bp,x,enc,kstr,klen,cb,u); | 152 | pem_str,bp,x,enc,kstr,klen,cb,u); |
153 | } | 153 | } |
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) | |||
199 | if (!x->ameth || !x->ameth->param_encode) | 199 | if (!x->ameth || !x->ameth->param_encode) |
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); | 202 | snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); |
203 | return PEM_ASN1_write_bio( | 203 | return PEM_ASN1_write_bio( |
204 | (i2d_of_void *)x->ameth->param_encode, | 204 | (i2d_of_void *)x->ameth->param_encode, |
205 | pem_str,bp,x,NULL,NULL,0,0,NULL); | 205 | pem_str,bp,x,NULL,NULL,0,0,NULL); |
diff --git a/src/lib/libcrypto/ts/ts_rsp_sign.c b/src/lib/libcrypto/ts/ts_rsp_sign.c index e52c9ff03b..58d5864823 100644 --- a/src/lib/libcrypto/ts/ts_rsp_sign.c +++ b/src/lib/libcrypto/ts/ts_rsp_sign.c | |||
@@ -983,7 +983,7 @@ TS_RESP_set_genTime_with_precision(ASN1_GENERALIZEDTIME *asn1_time, | |||
983 | if the elements correspond to 0, they MUST be wholly | 983 | if the elements correspond to 0, they MUST be wholly |
984 | omitted, and the decimal point element also MUST be | 984 | omitted, and the decimal point element also MUST be |
985 | omitted." */ | 985 | omitted." */ |
986 | (void)snprintf(usecstr, sizeof(usecstr), ".%06ld", usec); | 986 | snprintf(usecstr, sizeof(usecstr), ".%06ld", usec); |
987 | /* truncate and trim trailing 0 */ | 987 | /* truncate and trim trailing 0 */ |
988 | usecstr[precision + 1] = '\0'; | 988 | usecstr[precision + 1] = '\0'; |
989 | p = usecstr + strlen(usecstr) - 1; | 989 | p = usecstr + strlen(usecstr) - 1; |
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 58e4c5d722..4138c86d55 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -844,9 +844,9 @@ UI_set_result(UI *ui, UI_STRING *uis, const char *result) | |||
844 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1]; | 844 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1]; |
845 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1]; | 845 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1]; |
846 | 846 | ||
847 | (void) snprintf(number1, sizeof(number1), "%d", | 847 | snprintf(number1, sizeof(number1), "%d", |
848 | uis->_.string_data.result_minsize); | 848 | uis->_.string_data.result_minsize); |
849 | (void) snprintf(number2, sizeof(number2), "%d", | 849 | snprintf(number2, sizeof(number2), "%d", |
850 | uis->_.string_data.result_maxsize); | 850 | uis->_.string_data.result_maxsize); |
851 | 851 | ||
852 | if (l < uis->_.string_data.result_minsize) { | 852 | if (l < uis->_.string_data.result_minsize) { |
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index 749323be1e..ee1838a583 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -336,7 +336,7 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
336 | hent = NULL; | 336 | hent = NULL; |
337 | } | 337 | } |
338 | for (;;) { | 338 | for (;;) { |
339 | (void) snprintf(b->data, b->max, "%s/%08lx.%s%d", | 339 | snprintf(b->data, b->max, "%s/%08lx.%s%d", |
340 | ent->dir, h, postfix, k); | 340 | ent->dir, h, postfix, k); |
341 | 341 | ||
342 | #ifndef OPENSSL_NO_POSIX_IO | 342 | #ifndef OPENSSL_NO_POSIX_IO |
diff --git a/src/lib/libcrypto/x509/x509_txt.c b/src/lib/libcrypto/x509/x509_txt.c index 509948618e..8caf18a955 100644 --- a/src/lib/libcrypto/x509/x509_txt.c +++ b/src/lib/libcrypto/x509/x509_txt.c | |||
@@ -184,7 +184,7 @@ const char *X509_verify_cert_error_string(long n) | |||
184 | return("CRL path validation error"); | 184 | return("CRL path validation error"); |
185 | 185 | ||
186 | default: | 186 | default: |
187 | (void) snprintf(buf,sizeof buf,"error number %ld",n); | 187 | snprintf(buf,sizeof buf,"error number %ld",n); |
188 | return(buf); | 188 | return(buf); |
189 | } | 189 | } |
190 | } | 190 | } |
diff --git a/src/lib/libcrypto/x509v3/v3_alt.c b/src/lib/libcrypto/x509v3/v3_alt.c index 636677df94..95b1fa4c97 100644 --- a/src/lib/libcrypto/x509v3/v3_alt.c +++ b/src/lib/libcrypto/x509v3/v3_alt.c | |||
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | |||
143 | case GEN_IPADD: | 143 | case GEN_IPADD: |
144 | p = gen->d.ip->data; | 144 | p = gen->d.ip->data; |
145 | if(gen->d.ip->length == 4) | 145 | if(gen->d.ip->length == 4) |
146 | (void) snprintf(oline, sizeof oline, | 146 | snprintf(oline, sizeof oline, |
147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); | 147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); |
148 | else if(gen->d.ip->length == 16) | 148 | else if(gen->d.ip->length == 16) |
149 | { | 149 | { |
150 | oline[0] = 0; | 150 | oline[0] = 0; |
151 | for (i = 0; i < 8; i++) | 151 | for (i = 0; i < 8; i++) |
152 | { | 152 | { |
153 | (void) snprintf(htmp, sizeof htmp, | 153 | snprintf(htmp, sizeof htmp, |
154 | "%X", p[0] << 8 | p[1]); | 154 | "%X", p[0] << 8 | p[1]); |
155 | p += 2; | 155 | p += 2; |
156 | strlcat(oline, htmp, sizeof(oline)); | 156 | strlcat(oline, htmp, sizeof(oline)); |
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index 4a8be9993d..9a731fe75b 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
@@ -1449,7 +1449,7 @@ save_serial(char *serialfile, char *suffix, BIGNUM * serial, | |||
1449 | if (suffix == NULL) | 1449 | if (suffix == NULL) |
1450 | strlcpy(buf[0], serialfile, BSIZE); | 1450 | strlcpy(buf[0], serialfile, BSIZE); |
1451 | else | 1451 | else |
1452 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix); | 1452 | snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix); |
1453 | #ifdef RL_DEBUG | 1453 | #ifdef RL_DEBUG |
1454 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); | 1454 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); |
1455 | #endif | 1455 | #endif |
@@ -1495,9 +1495,9 @@ rotate_serial(char *serialfile, char *new_suffix, char *old_suffix) | |||
1495 | BIO_printf(bio_err, "file name too long\n"); | 1495 | BIO_printf(bio_err, "file name too long\n"); |
1496 | goto err; | 1496 | goto err; |
1497 | } | 1497 | } |
1498 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", | 1498 | snprintf(buf[0], sizeof buf[0], "%s.%s", |
1499 | serialfile, new_suffix); | 1499 | serialfile, new_suffix); |
1500 | (void) snprintf(buf[1], sizeof buf[1], "%s.%s", | 1500 | snprintf(buf[1], sizeof buf[1], "%s.%s", |
1501 | serialfile, old_suffix); | 1501 | serialfile, old_suffix); |
1502 | #ifdef RL_DEBUG | 1502 | #ifdef RL_DEBUG |
1503 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", | 1503 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", |
@@ -1580,7 +1580,7 @@ load_index(char *dbfile, DB_ATTR * db_attr) | |||
1580 | if ((tmpdb = TXT_DB_read(in, DB_NUMBER)) == NULL) | 1580 | if ((tmpdb = TXT_DB_read(in, DB_NUMBER)) == NULL) |
1581 | goto err; | 1581 | goto err; |
1582 | 1582 | ||
1583 | (void) snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile); | 1583 | snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile); |
1584 | dbattr_conf = NCONF_new(NULL); | 1584 | dbattr_conf = NCONF_new(NULL); |
1585 | if (NCONF_load(dbattr_conf, buf[0], &errorline) <= 0) { | 1585 | if (NCONF_load(dbattr_conf, buf[0], &errorline) <= 0) { |
1586 | if (errorline > 0) { | 1586 | if (errorline > 0) { |
@@ -1661,9 +1661,9 @@ save_index(const char *dbfile, const char *suffix, CA_DB * db) | |||
1661 | BIO_printf(bio_err, "file name too long\n"); | 1661 | BIO_printf(bio_err, "file name too long\n"); |
1662 | goto err; | 1662 | goto err; |
1663 | } | 1663 | } |
1664 | (void) snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile); | 1664 | snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile); |
1665 | (void) snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix); | 1665 | snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix); |
1666 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix); | 1666 | snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix); |
1667 | #ifdef RL_DEBUG | 1667 | #ifdef RL_DEBUG |
1668 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); | 1668 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); |
1669 | #endif | 1669 | #endif |
@@ -1710,14 +1710,14 @@ rotate_index(const char *dbfile, const char *new_suffix, const char *old_suffix) | |||
1710 | BIO_printf(bio_err, "file name too long\n"); | 1710 | BIO_printf(bio_err, "file name too long\n"); |
1711 | goto err; | 1711 | goto err; |
1712 | } | 1712 | } |
1713 | (void) snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile); | 1713 | snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile); |
1714 | (void) snprintf(buf[2], sizeof buf[2], "%s.attr.%s", | 1714 | snprintf(buf[2], sizeof buf[2], "%s.attr.%s", |
1715 | dbfile, new_suffix); | 1715 | dbfile, new_suffix); |
1716 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", | 1716 | snprintf(buf[0], sizeof buf[0], "%s.%s", |
1717 | dbfile, new_suffix); | 1717 | dbfile, new_suffix); |
1718 | (void) snprintf(buf[1], sizeof buf[1], "%s.%s", | 1718 | snprintf(buf[1], sizeof buf[1], "%s.%s", |
1719 | dbfile, old_suffix); | 1719 | dbfile, old_suffix); |
1720 | (void) snprintf(buf[3], sizeof buf[3], "%s.attr.%s", | 1720 | snprintf(buf[3], sizeof buf[3], "%s.attr.%s", |
1721 | dbfile, old_suffix); | 1721 | dbfile, old_suffix); |
1722 | #ifdef RL_DEBUG | 1722 | #ifdef RL_DEBUG |
1723 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", | 1723 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 3f2d10671c..c70ca5f168 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
@@ -1143,7 +1143,7 @@ ca_main(int argc, char **argv) | |||
1143 | for (k = 0; k < j; k++) { | 1143 | for (k = 0; k < j; k++) { |
1144 | if (n >= &(buf[2][sizeof(buf[2])])) | 1144 | if (n >= &(buf[2][sizeof(buf[2])])) |
1145 | break; | 1145 | break; |
1146 | (void) snprintf(n, | 1146 | snprintf(n, |
1147 | &buf[2][0] + sizeof(buf[2]) - n, | 1147 | &buf[2][0] + sizeof(buf[2]) - n, |
1148 | "%02X", (unsigned char) *(p++)); | 1148 | "%02X", (unsigned char) *(p++)); |
1149 | n += 2; | 1149 | n += 2; |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index 18760113c1..c8f04106cc 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
@@ -388,7 +388,7 @@ enc_main(int argc, char **argv) | |||
388 | for (;;) { | 388 | for (;;) { |
389 | char buf[200]; | 389 | char buf[200]; |
390 | 390 | ||
391 | (void) snprintf(buf, sizeof buf, "enter %s %s password:", | 391 | snprintf(buf, sizeof buf, "enter %s %s password:", |
392 | OBJ_nid2ln(EVP_CIPHER_nid(cipher)), | 392 | OBJ_nid2ln(EVP_CIPHER_nid(cipher)), |
393 | (enc) ? "encryption" : "decryption"); | 393 | (enc) ? "encryption" : "decryption"); |
394 | strbuf[0] = '\0'; | 394 | strbuf[0] = '\0'; |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 1ed8c84a8d..38428f856d 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
@@ -1081,17 +1081,17 @@ start: for (;;) { | |||
1081 | ERR_clear_error(); | 1081 | ERR_clear_error(); |
1082 | def = ""; | 1082 | def = ""; |
1083 | } | 1083 | } |
1084 | (void) snprintf(buf, sizeof buf, "%s_value", v->name); | 1084 | snprintf(buf, sizeof buf, "%s_value", v->name); |
1085 | if ((value = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) { | 1085 | if ((value = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) { |
1086 | ERR_clear_error(); | 1086 | ERR_clear_error(); |
1087 | value = NULL; | 1087 | value = NULL; |
1088 | } | 1088 | } |
1089 | (void) snprintf(buf, sizeof buf, "%s_min", v->name); | 1089 | snprintf(buf, sizeof buf, "%s_min", v->name); |
1090 | if (!NCONF_get_number(req_conf, dn_sect, buf, &n_min)) { | 1090 | if (!NCONF_get_number(req_conf, dn_sect, buf, &n_min)) { |
1091 | ERR_clear_error(); | 1091 | ERR_clear_error(); |
1092 | n_min = -1; | 1092 | n_min = -1; |
1093 | } | 1093 | } |
1094 | (void) snprintf(buf, sizeof buf, "%s_max", v->name); | 1094 | snprintf(buf, sizeof buf, "%s_max", v->name); |
1095 | if (!NCONF_get_number(req_conf, dn_sect, buf, &n_max)) { | 1095 | if (!NCONF_get_number(req_conf, dn_sect, buf, &n_max)) { |
1096 | ERR_clear_error(); | 1096 | ERR_clear_error(); |
1097 | n_max = -1; | 1097 | n_max = -1; |
@@ -1131,18 +1131,18 @@ start: for (;;) { | |||
1131 | ERR_clear_error(); | 1131 | ERR_clear_error(); |
1132 | def = ""; | 1132 | def = ""; |
1133 | } | 1133 | } |
1134 | (void) snprintf(buf, sizeof buf, "%s_value", type); | 1134 | snprintf(buf, sizeof buf, "%s_value", type); |
1135 | if ((value = NCONF_get_string(req_conf, attr_sect, buf)) | 1135 | if ((value = NCONF_get_string(req_conf, attr_sect, buf)) |
1136 | == NULL) { | 1136 | == NULL) { |
1137 | ERR_clear_error(); | 1137 | ERR_clear_error(); |
1138 | value = NULL; | 1138 | value = NULL; |
1139 | } | 1139 | } |
1140 | (void) snprintf(buf, sizeof buf, "%s_min", type); | 1140 | snprintf(buf, sizeof buf, "%s_min", type); |
1141 | if (!NCONF_get_number(req_conf, attr_sect, buf, &n_min)) { | 1141 | if (!NCONF_get_number(req_conf, attr_sect, buf, &n_min)) { |
1142 | ERR_clear_error(); | 1142 | ERR_clear_error(); |
1143 | n_min = -1; | 1143 | n_min = -1; |
1144 | } | 1144 | } |
1145 | (void) snprintf(buf, sizeof buf, "%s_max", type); | 1145 | snprintf(buf, sizeof buf, "%s_max", type); |
1146 | if (!NCONF_get_number(req_conf, attr_sect, buf, &n_max)) { | 1146 | if (!NCONF_get_number(req_conf, attr_sect, buf, &n_max)) { |
1147 | ERR_clear_error(); | 1147 | ERR_clear_error(); |
1148 | n_max = -1; | 1148 | n_max = -1; |
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c index f74c9b9c7f..e7fc7e2e07 100644 --- a/src/lib/libssl/src/apps/s_time.c +++ b/src/lib/libssl/src/apps/s_time.c | |||
@@ -398,7 +398,7 @@ s_time_main(int argc, char **argv) | |||
398 | goto end; | 398 | goto end; |
399 | 399 | ||
400 | if (s_www_path != NULL) { | 400 | if (s_www_path != NULL) { |
401 | (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); | 401 | snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); |
402 | SSL_write(scon, buf, strlen(buf)); | 402 | SSL_write(scon, buf, strlen(buf)); |
403 | while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) | 403 | while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) |
404 | bytes_read += i; | 404 | bytes_read += i; |
@@ -453,7 +453,7 @@ next: | |||
453 | goto end; | 453 | goto end; |
454 | } | 454 | } |
455 | if (s_www_path != NULL) { | 455 | if (s_www_path != NULL) { |
456 | (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); | 456 | snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); |
457 | SSL_write(scon, buf, strlen(buf)); | 457 | SSL_write(scon, buf, strlen(buf)); |
458 | while (SSL_read(scon, buf, sizeof(buf)) > 0); | 458 | while (SSL_read(scon, buf, sizeof(buf)) > 0); |
459 | } | 459 | } |
@@ -490,7 +490,7 @@ next: | |||
490 | goto end; | 490 | goto end; |
491 | 491 | ||
492 | if (s_www_path) { | 492 | if (s_www_path) { |
493 | (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); | 493 | snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path); |
494 | SSL_write(scon, buf, strlen(buf)); | 494 | SSL_write(scon, buf, strlen(buf)); |
495 | while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) | 495 | while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) |
496 | bytes_read += i; | 496 | bytes_read += i; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_gentm.c b/src/lib/libssl/src/crypto/asn1/a_gentm.c index 856aaf0c77..f331bff320 100644 --- a/src/lib/libssl/src/crypto/asn1/a_gentm.c +++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c | |||
@@ -244,7 +244,7 @@ ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day, | |||
244 | s->data = (unsigned char *)p; | 244 | s->data = (unsigned char *)p; |
245 | } | 245 | } |
246 | 246 | ||
247 | (void) snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900, | 247 | snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900, |
248 | ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec); | 248 | ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec); |
249 | s->length = strlen(p); | 249 | s->length = strlen(p); |
250 | s->type = V_ASN1_GENERALIZEDTIME; | 250 | s->type = V_ASN1_GENERALIZEDTIME; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_mbstr.c b/src/lib/libssl/src/crypto/asn1/a_mbstr.c index 5a909d6ae2..6528161c41 100644 --- a/src/lib/libssl/src/crypto/asn1/a_mbstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_mbstr.c | |||
@@ -150,14 +150,14 @@ ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
150 | 150 | ||
151 | if ((minsize > 0) && (nchar < minsize)) { | 151 | if ((minsize > 0) && (nchar < minsize)) { |
152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); | 152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
153 | (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 153 | snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
154 | ERR_add_error_data(2, "minsize=", strbuf); | 154 | ERR_add_error_data(2, "minsize=", strbuf); |
155 | return -1; | 155 | return -1; |
156 | } | 156 | } |
157 | 157 | ||
158 | if ((maxsize > 0) && (nchar > maxsize)) { | 158 | if ((maxsize > 0) && (nchar > maxsize)) { |
159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); | 159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
160 | (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 160 | snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
161 | ERR_add_error_data(2, "maxsize=", strbuf); | 161 | ERR_add_error_data(2, "maxsize=", strbuf); |
162 | return -1; | 162 | return -1; |
163 | } | 163 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c index 7dc531a2d8..e92c166303 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strex.c +++ b/src/lib/libssl/src/crypto/asn1/a_strex.c | |||
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
125 | if(c > 0xffffffffL) | 125 | if(c > 0xffffffffL) |
126 | return -1; | 126 | return -1; |
127 | if(c > 0xffff) { | 127 | if(c > 0xffff) { |
128 | (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); | 128 | snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); |
129 | if(!io_ch(arg, tmphex, 10)) return -1; | 129 | if(!io_ch(arg, tmphex, 10)) return -1; |
130 | return 10; | 130 | return 10; |
131 | } | 131 | } |
132 | if(c > 0xff) { | 132 | if(c > 0xff) { |
133 | (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); | 133 | snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); |
134 | if(!io_ch(arg, tmphex, 6)) return -1; | 134 | if(!io_ch(arg, tmphex, 6)) return -1; |
135 | return 6; | 135 | return 6; |
136 | } | 136 | } |
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
149 | return 2; | 149 | return 2; |
150 | } | 150 | } |
151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { | 151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { |
152 | (void) snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp); | 152 | snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp); |
153 | if(!io_ch(arg, tmphex, 3)) return -1; | 153 | if(!io_ch(arg, tmphex, 3)) return -1; |
154 | return 3; | 154 | return 3; |
155 | } | 155 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c index a2325f2525..0120b952b3 100644 --- a/src/lib/libssl/src/crypto/asn1/a_utctm.c +++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c | |||
@@ -205,7 +205,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | |||
205 | s->data=(unsigned char *)p; | 205 | s->data=(unsigned char *)p; |
206 | } | 206 | } |
207 | 207 | ||
208 | (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, | 208 | snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, |
209 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 209 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
210 | s->length=strlen(p); | 210 | s->length=strlen(p); |
211 | s->type=V_ASN1_UTCTIME; | 211 | s->type=V_ASN1_UTCTIME; |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c index 49d650b125..86cfdd3967 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c | |||
@@ -467,8 +467,8 @@ asn1_add_error(const unsigned char *address, int offset) | |||
467 | { | 467 | { |
468 | char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1]; | 468 | char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1]; |
469 | 469 | ||
470 | (void) snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address); | 470 | snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address); |
471 | (void) snprintf(buf2, sizeof buf2, "%d", offset); | 471 | snprintf(buf2, sizeof buf2, "%d", offset); |
472 | ERR_add_error_data(4, "address=", buf1, " offset=", buf2); | 472 | ERR_add_error_data(4, "address=", buf1, " offset=", buf2); |
473 | } | 473 | } |
474 | 474 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_par.c b/src/lib/libssl/src/crypto/asn1/asn1_par.c index 064b3dcb22..8085d1e570 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_par.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_par.c | |||
@@ -85,13 +85,13 @@ asn1_print_info(BIO *bp, int tag, int xclass, int constructed, | |||
85 | 85 | ||
86 | p = str; | 86 | p = str; |
87 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) | 87 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) |
88 | (void) snprintf(str, sizeof str, "priv [ %d ] ", tag); | 88 | snprintf(str, sizeof str, "priv [ %d ] ", tag); |
89 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) | 89 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) |
90 | (void) snprintf(str, sizeof str, "cont [ %d ]", tag); | 90 | snprintf(str, sizeof str, "cont [ %d ]", tag); |
91 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) | 91 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) |
92 | (void) snprintf(str, sizeof str, "appl [ %d ]", tag); | 92 | snprintf(str, sizeof str, "appl [ %d ]", tag); |
93 | else if (tag > 30) | 93 | else if (tag > 30) |
94 | (void) snprintf(str, sizeof str, "<ASN1 %d>", tag); | 94 | snprintf(str, sizeof str, "<ASN1 %d>", tag); |
95 | else | 95 | else |
96 | p = ASN1_tag2str(tag); | 96 | p = ASN1_tag2str(tag); |
97 | 97 | ||
diff --git a/src/lib/libssl/src/crypto/bio/b_dump.c b/src/lib/libssl/src/crypto/bio/b_dump.c index 61c9fe20a3..740686c957 100644 --- a/src/lib/libssl/src/crypto/bio/b_dump.c +++ b/src/lib/libssl/src/crypto/bio/b_dump.c | |||
@@ -108,14 +108,14 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
108 | for (i = 0; i < rows; i++) { | 108 | for (i = 0; i < rows; i++) { |
109 | buf[0] = '\0'; /* start with empty string */ | 109 | buf[0] = '\0'; /* start with empty string */ |
110 | strlcpy(buf, str, sizeof buf); | 110 | strlcpy(buf, str, sizeof buf); |
111 | (void) snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); | 111 | snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); |
112 | strlcat(buf, tmp, sizeof buf); | 112 | strlcat(buf, tmp, sizeof buf); |
113 | for (j = 0; j < dump_width; j++) { | 113 | for (j = 0; j < dump_width; j++) { |
114 | if (((i*dump_width) + j) >= len) { | 114 | if (((i*dump_width) + j) >= len) { |
115 | strlcat(buf, " ", sizeof buf); | 115 | strlcat(buf, " ", sizeof buf); |
116 | } else { | 116 | } else { |
117 | ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff; | 117 | ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff; |
118 | (void) snprintf(tmp, sizeof tmp, "%02x%c", ch, | 118 | snprintf(tmp, sizeof tmp, "%02x%c", ch, |
119 | j == 7 ? '-' : ' '); | 119 | j == 7 ? '-' : ' '); |
120 | strlcat(buf, tmp, sizeof buf); | 120 | strlcat(buf, tmp, sizeof buf); |
121 | } | 121 | } |
@@ -125,7 +125,7 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
125 | if (((i*dump_width) + j) >= len) | 125 | if (((i*dump_width) + j) >= len) |
126 | break; | 126 | break; |
127 | ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; | 127 | ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; |
128 | (void) snprintf(tmp, sizeof tmp, "%c", | 128 | snprintf(tmp, sizeof tmp, "%c", |
129 | ((ch >= ' ') && (ch <= '~')) ? ch : '.'); | 129 | ((ch >= ' ') && (ch <= '~')) ? ch : '.'); |
130 | strlcat(buf, tmp, sizeof buf); | 130 | strlcat(buf, tmp, sizeof buf); |
131 | } | 131 | } |
@@ -137,7 +137,7 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
137 | } | 137 | } |
138 | #ifdef TRUNCATE | 138 | #ifdef TRUNCATE |
139 | if (trc > 0) { | 139 | if (trc > 0) { |
140 | (void) snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n", | 140 | snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n", |
141 | str, len + trc); | 141 | str, len + trc); |
142 | ret += cb((void *)buf, strlen(buf), u); | 142 | ret += cb((void *)buf, strlen(buf), u); |
143 | } | 143 | } |
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index a82c79a1b0..a6dd43f397 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
@@ -543,7 +543,7 @@ BIO_accept(int sock, char **addr) | |||
543 | goto end; | 543 | goto end; |
544 | } | 544 | } |
545 | *addr = p; | 545 | *addr = p; |
546 | (void) snprintf(*addr, nl, "%s:%s", h, s); | 546 | snprintf(*addr, nl, "%s:%s", h, s); |
547 | goto end; | 547 | goto end; |
548 | } while (0); | 548 | } while (0); |
549 | #endif | 549 | #endif |
@@ -558,7 +558,7 @@ BIO_accept(int sock, char **addr) | |||
558 | } | 558 | } |
559 | *addr = p; | 559 | *addr = p; |
560 | } | 560 | } |
561 | (void) snprintf(*addr, 24, "%d.%d.%d.%d:%d", | 561 | snprintf(*addr, 24, "%d.%d.%d.%d:%d", |
562 | (unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff, | 562 | (unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff, |
563 | (unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port); | 563 | (unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port); |
564 | 564 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bio_cb.c b/src/lib/libssl/src/crypto/bio/bio_cb.c index a272bf969a..133d2b77dc 100644 --- a/src/lib/libssl/src/crypto/bio/bio_cb.c +++ b/src/lib/libssl/src/crypto/bio/bio_cb.c | |||
@@ -76,62 +76,62 @@ BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, | |||
76 | if (BIO_CB_RETURN & cmd) | 76 | if (BIO_CB_RETURN & cmd) |
77 | r = ret; | 77 | r = ret; |
78 | 78 | ||
79 | (void) snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio); | 79 | snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio); |
80 | p = &(buf[14]); | 80 | p = &(buf[14]); |
81 | p_maxlen = sizeof buf - 14; | 81 | p_maxlen = sizeof buf - 14; |
82 | switch (cmd) { | 82 | switch (cmd) { |
83 | case BIO_CB_FREE: | 83 | case BIO_CB_FREE: |
84 | (void) snprintf(p, p_maxlen, "Free - %s\n", bio->method->name); | 84 | snprintf(p, p_maxlen, "Free - %s\n", bio->method->name); |
85 | break; | 85 | break; |
86 | case BIO_CB_READ: | 86 | case BIO_CB_READ: |
87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
88 | (void) snprintf(p, p_maxlen, | 88 | snprintf(p, p_maxlen, |
89 | "read(%d,%lu) - %s fd=%d\n", | 89 | "read(%d,%lu) - %s fd=%d\n", |
90 | bio->num, (unsigned long)argi, | 90 | bio->num, (unsigned long)argi, |
91 | bio->method->name, bio->num); | 91 | bio->method->name, bio->num); |
92 | else | 92 | else |
93 | (void) snprintf(p, p_maxlen, "read(%d,%lu) - %s\n", | 93 | snprintf(p, p_maxlen, "read(%d,%lu) - %s\n", |
94 | bio->num, (unsigned long)argi, bio->method->name); | 94 | bio->num, (unsigned long)argi, bio->method->name); |
95 | break; | 95 | break; |
96 | case BIO_CB_WRITE: | 96 | case BIO_CB_WRITE: |
97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
98 | (void) snprintf(p, p_maxlen, | 98 | snprintf(p, p_maxlen, |
99 | "write(%d,%lu) - %s fd=%d\n", | 99 | "write(%d,%lu) - %s fd=%d\n", |
100 | bio->num, (unsigned long)argi, | 100 | bio->num, (unsigned long)argi, |
101 | bio->method->name, bio->num); | 101 | bio->method->name, bio->num); |
102 | else | 102 | else |
103 | (void) snprintf(p, p_maxlen, "write(%d,%lu) - %s\n", | 103 | snprintf(p, p_maxlen, "write(%d,%lu) - %s\n", |
104 | bio->num, (unsigned long)argi, bio->method->name); | 104 | bio->num, (unsigned long)argi, bio->method->name); |
105 | break; | 105 | break; |
106 | case BIO_CB_PUTS: | 106 | case BIO_CB_PUTS: |
107 | (void) snprintf(p, p_maxlen, | 107 | snprintf(p, p_maxlen, |
108 | "puts() - %s\n", bio->method->name); | 108 | "puts() - %s\n", bio->method->name); |
109 | break; | 109 | break; |
110 | case BIO_CB_GETS: | 110 | case BIO_CB_GETS: |
111 | (void) snprintf(p, p_maxlen, "gets(%lu) - %s\n", | 111 | snprintf(p, p_maxlen, "gets(%lu) - %s\n", |
112 | (unsigned long)argi, bio->method->name); | 112 | (unsigned long)argi, bio->method->name); |
113 | break; | 113 | break; |
114 | case BIO_CB_CTRL: | 114 | case BIO_CB_CTRL: |
115 | (void) snprintf(p, p_maxlen, "ctrl(%lu) - %s\n", | 115 | snprintf(p, p_maxlen, "ctrl(%lu) - %s\n", |
116 | (unsigned long)argi, bio->method->name); | 116 | (unsigned long)argi, bio->method->name); |
117 | break; | 117 | break; |
118 | case BIO_CB_RETURN|BIO_CB_READ: | 118 | case BIO_CB_RETURN|BIO_CB_READ: |
119 | (void) snprintf(p, p_maxlen, "read return %ld\n", ret); | 119 | snprintf(p, p_maxlen, "read return %ld\n", ret); |
120 | break; | 120 | break; |
121 | case BIO_CB_RETURN|BIO_CB_WRITE: | 121 | case BIO_CB_RETURN|BIO_CB_WRITE: |
122 | (void) snprintf(p, p_maxlen, "write return %ld\n", ret); | 122 | snprintf(p, p_maxlen, "write return %ld\n", ret); |
123 | break; | 123 | break; |
124 | case BIO_CB_RETURN|BIO_CB_GETS: | 124 | case BIO_CB_RETURN|BIO_CB_GETS: |
125 | (void) snprintf(p, p_maxlen, "gets return %ld\n", ret); | 125 | snprintf(p, p_maxlen, "gets return %ld\n", ret); |
126 | break; | 126 | break; |
127 | case BIO_CB_RETURN|BIO_CB_PUTS: | 127 | case BIO_CB_RETURN|BIO_CB_PUTS: |
128 | (void) snprintf(p, p_maxlen, "puts return %ld\n", ret); | 128 | snprintf(p, p_maxlen, "puts return %ld\n", ret); |
129 | break; | 129 | break; |
130 | case BIO_CB_RETURN|BIO_CB_CTRL: | 130 | case BIO_CB_RETURN|BIO_CB_CTRL: |
131 | (void) snprintf(p, p_maxlen, "ctrl return %ld\n", ret); | 131 | snprintf(p, p_maxlen, "ctrl return %ld\n", ret); |
132 | break; | 132 | break; |
133 | default: | 133 | default: |
134 | (void) snprintf(p, p_maxlen, | 134 | snprintf(p, p_maxlen, |
135 | "bio callback - unknown type (%d)\n", cmd); | 135 | "bio callback - unknown type (%d)\n", cmd); |
136 | break; | 136 | break; |
137 | } | 137 | } |
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c index fca5d5e853..45815fd696 100644 --- a/src/lib/libssl/src/crypto/bio/bss_conn.c +++ b/src/lib/libssl/src/crypto/bio/bss_conn.c | |||
@@ -482,7 +482,7 @@ conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
482 | char buf[16]; | 482 | char buf[16]; |
483 | unsigned char *p = ptr; | 483 | unsigned char *p = ptr; |
484 | 484 | ||
485 | (void) snprintf(buf, sizeof buf, "%d.%d.%d.%d", | 485 | snprintf(buf, sizeof buf, "%d.%d.%d.%d", |
486 | p[0], p[1], p[2], p[3]); | 486 | p[0], p[1], p[2], p[3]); |
487 | if (data->param_hostname != NULL) | 487 | if (data->param_hostname != NULL) |
488 | free(data->param_hostname); | 488 | free(data->param_hostname); |
@@ -491,7 +491,7 @@ conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
491 | } else if (num == 3) { | 491 | } else if (num == 3) { |
492 | char buf[DECIMAL_SIZE(int) + 1]; | 492 | char buf[DECIMAL_SIZE(int) + 1]; |
493 | 493 | ||
494 | (void) snprintf(buf, sizeof buf, "%d", | 494 | snprintf(buf, sizeof buf, "%d", |
495 | *(int *)ptr); | 495 | *(int *)ptr); |
496 | if (data->param_port != NULL) | 496 | if (data->param_port != NULL) |
497 | free(data->param_port); | 497 | free(data->param_port); |
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c index e2cab2497f..49efbcb9a9 100644 --- a/src/lib/libssl/src/crypto/bn/bn_print.c +++ b/src/lib/libssl/src/crypto/bn/bn_print.c | |||
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a) | |||
147 | /* We now have a series of blocks, BN_DEC_NUM chars | 147 | /* We now have a series of blocks, BN_DEC_NUM chars |
148 | * in length, where the last one needs truncation. | 148 | * in length, where the last one needs truncation. |
149 | * The blocks need to be reversed in order. */ | 149 | * The blocks need to be reversed in order. */ |
150 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); | 150 | snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); |
151 | while (*p) p++; | 151 | while (*p) p++; |
152 | while (lp != bn_data) | 152 | while (lp != bn_data) |
153 | { | 153 | { |
154 | lp--; | 154 | lp--; |
155 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); | 155 | snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); |
156 | while (*p) p++; | 156 | while (*p) p++; |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -367,10 +367,10 @@ char *BN_options(void) | |||
367 | { | 367 | { |
368 | init++; | 368 | init++; |
369 | #ifdef BN_LLONG | 369 | #ifdef BN_LLONG |
370 | (void) snprintf(data,sizeof data,"bn(%d,%d)", | 370 | snprintf(data,sizeof data,"bn(%d,%d)", |
371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); | 371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); |
372 | #else | 372 | #else |
373 | (void) snprintf(data,sizeof data,"bn(%d,%d)", | 373 | snprintf(data,sizeof data,"bn(%d,%d)", |
374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); | 374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); |
375 | #endif | 375 | #endif |
376 | } | 376 | } |
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c index 26aee50a45..5ab995a5c0 100644 --- a/src/lib/libssl/src/crypto/conf/conf_def.c +++ b/src/lib/libssl/src/crypto/conf/conf_def.c | |||
@@ -435,7 +435,7 @@ err: | |||
435 | if (buff != NULL) BUF_MEM_free(buff); | 435 | if (buff != NULL) BUF_MEM_free(buff); |
436 | if (section != NULL) free(section); | 436 | if (section != NULL) free(section); |
437 | if (line != NULL) *line=eline; | 437 | if (line != NULL) *line=eline; |
438 | (void) snprintf(btmp,sizeof btmp,"%ld",eline); | 438 | snprintf(btmp,sizeof btmp,"%ld",eline); |
439 | ERR_add_error_data(2,"line ",btmp); | 439 | ERR_add_error_data(2,"line ",btmp); |
440 | if ((h != conf->data) && (conf->data != NULL)) | 440 | if ((h != conf->data) && (conf->data != NULL)) |
441 | { | 441 | { |
diff --git a/src/lib/libssl/src/crypto/conf/conf_mod.c b/src/lib/libssl/src/crypto/conf/conf_mod.c index 2417086537..af33451844 100644 --- a/src/lib/libssl/src/crypto/conf/conf_mod.c +++ b/src/lib/libssl/src/crypto/conf/conf_mod.c | |||
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value, | |||
233 | { | 233 | { |
234 | char rcode[DECIMAL_SIZE(ret)+1]; | 234 | char rcode[DECIMAL_SIZE(ret)+1]; |
235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); | 235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); |
236 | (void) snprintf(rcode, sizeof rcode, "%-8d", ret); | 236 | snprintf(rcode, sizeof rcode, "%-8d", ret); |
237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); | 237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); |
238 | } | 238 | } |
239 | } | 239 | } |
diff --git a/src/lib/libssl/src/crypto/cversion.c b/src/lib/libssl/src/crypto/cversion.c index 7ecfaf9f2f..326216d084 100644 --- a/src/lib/libssl/src/crypto/cversion.c +++ b/src/lib/libssl/src/crypto/cversion.c | |||
@@ -67,7 +67,7 @@ SSLeay_version(int t) | |||
67 | #ifdef DATE | 67 | #ifdef DATE |
68 | static char buf[sizeof(DATE) + 11]; | 68 | static char buf[sizeof(DATE) + 11]; |
69 | 69 | ||
70 | (void) snprintf(buf, sizeof buf, "built on: %s", DATE); | 70 | snprintf(buf, sizeof buf, "built on: %s", DATE); |
71 | return (buf); | 71 | return (buf); |
72 | #else | 72 | #else |
73 | return("built on: date not available"); | 73 | return("built on: date not available"); |
@@ -77,7 +77,7 @@ SSLeay_version(int t) | |||
77 | #ifdef CFLAGS | 77 | #ifdef CFLAGS |
78 | static char buf[sizeof(CFLAGS) + 11]; | 78 | static char buf[sizeof(CFLAGS) + 11]; |
79 | 79 | ||
80 | (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); | 80 | snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); |
81 | return (buf); | 81 | return (buf); |
82 | #else | 82 | #else |
83 | return("compiler: information not available"); | 83 | return("compiler: information not available"); |
@@ -87,7 +87,7 @@ SSLeay_version(int t) | |||
87 | #ifdef PLATFORM | 87 | #ifdef PLATFORM |
88 | static char buf[sizeof(PLATFORM) + 11]; | 88 | static char buf[sizeof(PLATFORM) + 11]; |
89 | 89 | ||
90 | (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM); | 90 | snprintf(buf, sizeof buf, "platform: %s", PLATFORM); |
91 | return (buf); | 91 | return (buf); |
92 | #else | 92 | #else |
93 | return("platform: information not available"); | 93 | return("platform: information not available"); |
diff --git a/src/lib/libssl/src/crypto/des/ecb_enc.c b/src/lib/libssl/src/crypto/des/ecb_enc.c index b83fca71db..f357333b97 100644 --- a/src/lib/libssl/src/crypto/des/ecb_enc.c +++ b/src/lib/libssl/src/crypto/des/ecb_enc.c | |||
@@ -97,7 +97,7 @@ const char *DES_options(void) | |||
97 | size="int"; | 97 | size="int"; |
98 | else | 98 | else |
99 | size="long"; | 99 | size="long"; |
100 | (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, | 100 | snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, |
101 | size); | 101 | size); |
102 | init=0; | 102 | init=0; |
103 | } | 103 | } |
diff --git a/src/lib/libssl/src/crypto/engine/eng_padlock.c b/src/lib/libssl/src/crypto/engine/eng_padlock.c index d5d9a16bf2..a007685111 100644 --- a/src/lib/libssl/src/crypto/engine/eng_padlock.c +++ b/src/lib/libssl/src/crypto/engine/eng_padlock.c | |||
@@ -177,7 +177,7 @@ padlock_bind_helper(ENGINE *e) | |||
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | /* Generate a nice engine name with available features */ | 179 | /* Generate a nice engine name with available features */ |
180 | (void) snprintf(padlock_name, sizeof(padlock_name), | 180 | snprintf(padlock_name, sizeof(padlock_name), |
181 | "VIA PadLock (%s, %s)", | 181 | "VIA PadLock (%s, %s)", |
182 | padlock_use_rng ? "RNG" : "no-RNG", | 182 | padlock_use_rng ? "RNG" : "no-RNG", |
183 | padlock_use_ace ? "ACE" : "no-ACE"); | 183 | padlock_use_ace ? "ACE" : "no-ACE"); |
diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c index 0672477cc8..c4192c6bfa 100644 --- a/src/lib/libssl/src/crypto/err/err.c +++ b/src/lib/libssl/src/crypto/err/err.c | |||
@@ -842,13 +842,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len) | |||
842 | rs=ERR_reason_error_string(e); | 842 | rs=ERR_reason_error_string(e); |
843 | 843 | ||
844 | if (ls == NULL) | 844 | if (ls == NULL) |
845 | (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | 845 | snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); |
846 | if (fs == NULL) | 846 | if (fs == NULL) |
847 | (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); | 847 | snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); |
848 | if (rs == NULL) | 848 | if (rs == NULL) |
849 | (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); | 849 | snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); |
850 | 850 | ||
851 | (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, | 851 | snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, |
852 | fs?fs:fsbuf, rs?rs:rsbuf); | 852 | fs?fs:fsbuf, rs?rs:rsbuf); |
853 | if (strlen(buf) == len-1) | 853 | if (strlen(buf) == len-1) |
854 | { | 854 | { |
diff --git a/src/lib/libssl/src/crypto/err/err_prn.c b/src/lib/libssl/src/crypto/err/err_prn.c index 7374c0abe7..be4d5de2d2 100644 --- a/src/lib/libssl/src/crypto/err/err_prn.c +++ b/src/lib/libssl/src/crypto/err/err_prn.c | |||
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), | |||
79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
80 | { | 80 | { |
81 | ERR_error_string_n(l, buf, sizeof buf); | 81 | ERR_error_string_n(l, buf, sizeof buf); |
82 | (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, | 82 | snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, |
83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); | 83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); |
84 | if (cb(buf2, strlen(buf2), u) <= 0) | 84 | if (cb(buf2, strlen(buf2), u) <= 0) |
85 | break; /* abort outputting the error report */ | 85 | break; /* abort outputting the error report */ |
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c index b3388b117d..cc007f1206 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.c +++ b/src/lib/libssl/src/crypto/objects/obj_dat.c | |||
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
594 | } | 594 | } |
595 | else | 595 | else |
596 | { | 596 | { |
597 | (void) snprintf(tbuf,sizeof tbuf,".%lu",l); | 597 | snprintf(tbuf,sizeof tbuf,".%lu",l); |
598 | i=strlen(tbuf); | 598 | i=strlen(tbuf); |
599 | if (buf && (buf_len > 0)) | 599 | if (buf && (buf_len > 0)) |
600 | { | 600 | { |
diff --git a/src/lib/libssl/src/crypto/pem/pem_pkey.c b/src/lib/libssl/src/crypto/pem/pem_pkey.c index a3b609b2f3..c8cf00dd87 100644 --- a/src/lib/libssl/src/crypto/pem/pem_pkey.c +++ b/src/lib/libssl/src/crypto/pem/pem_pkey.c | |||
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | |||
147 | (char *)kstr, klen, | 147 | (char *)kstr, klen, |
148 | cb, u); | 148 | cb, u); |
149 | 149 | ||
150 | (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); | 150 | snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); |
151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, | 151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, |
152 | pem_str,bp,x,enc,kstr,klen,cb,u); | 152 | pem_str,bp,x,enc,kstr,klen,cb,u); |
153 | } | 153 | } |
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) | |||
199 | if (!x->ameth || !x->ameth->param_encode) | 199 | if (!x->ameth || !x->ameth->param_encode) |
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); | 202 | snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); |
203 | return PEM_ASN1_write_bio( | 203 | return PEM_ASN1_write_bio( |
204 | (i2d_of_void *)x->ameth->param_encode, | 204 | (i2d_of_void *)x->ameth->param_encode, |
205 | pem_str,bp,x,NULL,NULL,0,0,NULL); | 205 | pem_str,bp,x,NULL,NULL,0,0,NULL); |
diff --git a/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c b/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c index e52c9ff03b..58d5864823 100644 --- a/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c +++ b/src/lib/libssl/src/crypto/ts/ts_rsp_sign.c | |||
@@ -983,7 +983,7 @@ TS_RESP_set_genTime_with_precision(ASN1_GENERALIZEDTIME *asn1_time, | |||
983 | if the elements correspond to 0, they MUST be wholly | 983 | if the elements correspond to 0, they MUST be wholly |
984 | omitted, and the decimal point element also MUST be | 984 | omitted, and the decimal point element also MUST be |
985 | omitted." */ | 985 | omitted." */ |
986 | (void)snprintf(usecstr, sizeof(usecstr), ".%06ld", usec); | 986 | snprintf(usecstr, sizeof(usecstr), ".%06ld", usec); |
987 | /* truncate and trim trailing 0 */ | 987 | /* truncate and trim trailing 0 */ |
988 | usecstr[precision + 1] = '\0'; | 988 | usecstr[precision + 1] = '\0'; |
989 | p = usecstr + strlen(usecstr) - 1; | 989 | p = usecstr + strlen(usecstr) - 1; |
diff --git a/src/lib/libssl/src/crypto/ui/ui_lib.c b/src/lib/libssl/src/crypto/ui/ui_lib.c index 58e4c5d722..4138c86d55 100644 --- a/src/lib/libssl/src/crypto/ui/ui_lib.c +++ b/src/lib/libssl/src/crypto/ui/ui_lib.c | |||
@@ -844,9 +844,9 @@ UI_set_result(UI *ui, UI_STRING *uis, const char *result) | |||
844 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1]; | 844 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1]; |
845 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1]; | 845 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1]; |
846 | 846 | ||
847 | (void) snprintf(number1, sizeof(number1), "%d", | 847 | snprintf(number1, sizeof(number1), "%d", |
848 | uis->_.string_data.result_minsize); | 848 | uis->_.string_data.result_minsize); |
849 | (void) snprintf(number2, sizeof(number2), "%d", | 849 | snprintf(number2, sizeof(number2), "%d", |
850 | uis->_.string_data.result_maxsize); | 850 | uis->_.string_data.result_maxsize); |
851 | 851 | ||
852 | if (l < uis->_.string_data.result_minsize) { | 852 | if (l < uis->_.string_data.result_minsize) { |
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c index 749323be1e..ee1838a583 100644 --- a/src/lib/libssl/src/crypto/x509/by_dir.c +++ b/src/lib/libssl/src/crypto/x509/by_dir.c | |||
@@ -336,7 +336,7 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
336 | hent = NULL; | 336 | hent = NULL; |
337 | } | 337 | } |
338 | for (;;) { | 338 | for (;;) { |
339 | (void) snprintf(b->data, b->max, "%s/%08lx.%s%d", | 339 | snprintf(b->data, b->max, "%s/%08lx.%s%d", |
340 | ent->dir, h, postfix, k); | 340 | ent->dir, h, postfix, k); |
341 | 341 | ||
342 | #ifndef OPENSSL_NO_POSIX_IO | 342 | #ifndef OPENSSL_NO_POSIX_IO |
diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c index 509948618e..8caf18a955 100644 --- a/src/lib/libssl/src/crypto/x509/x509_txt.c +++ b/src/lib/libssl/src/crypto/x509/x509_txt.c | |||
@@ -184,7 +184,7 @@ const char *X509_verify_cert_error_string(long n) | |||
184 | return("CRL path validation error"); | 184 | return("CRL path validation error"); |
185 | 185 | ||
186 | default: | 186 | default: |
187 | (void) snprintf(buf,sizeof buf,"error number %ld",n); | 187 | snprintf(buf,sizeof buf,"error number %ld",n); |
188 | return(buf); | 188 | return(buf); |
189 | } | 189 | } |
190 | } | 190 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_alt.c b/src/lib/libssl/src/crypto/x509v3/v3_alt.c index 636677df94..95b1fa4c97 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c | |||
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | |||
143 | case GEN_IPADD: | 143 | case GEN_IPADD: |
144 | p = gen->d.ip->data; | 144 | p = gen->d.ip->data; |
145 | if(gen->d.ip->length == 4) | 145 | if(gen->d.ip->length == 4) |
146 | (void) snprintf(oline, sizeof oline, | 146 | snprintf(oline, sizeof oline, |
147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); | 147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); |
148 | else if(gen->d.ip->length == 16) | 148 | else if(gen->d.ip->length == 16) |
149 | { | 149 | { |
150 | oline[0] = 0; | 150 | oline[0] = 0; |
151 | for (i = 0; i < 8; i++) | 151 | for (i = 0; i < 8; i++) |
152 | { | 152 | { |
153 | (void) snprintf(htmp, sizeof htmp, | 153 | snprintf(htmp, sizeof htmp, |
154 | "%X", p[0] << 8 | p[1]); | 154 | "%X", p[0] << 8 | p[1]); |
155 | p += 2; | 155 | p += 2; |
156 | strlcat(oline, htmp, sizeof(oline)); | 156 | strlcat(oline, htmp, sizeof(oline)); |