summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn
diff options
context:
space:
mode:
authorguenther <>2014-04-19 11:46:39 +0000
committerguenther <>2014-04-19 11:46:39 +0000
commitf376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0 (patch)
tree1c4f9b095801061d57e575e80f245cef8a59a27f /src/lib/libcrypto/bn
parent597610ccf04bbca4e88fac7988877d0a06e02211 (diff)
downloadopenbsd-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/bn')
-rw-r--r--src/lib/libcrypto/bn/bn_print.c8
1 files changed, 4 insertions, 4 deletions
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 }