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/lib/libcrypto/asn1/a_strex.c | |
| 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/lib/libcrypto/asn1/a_strex.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_strex.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 | } |
