diff options
Diffstat (limited to 'src/lib/libcrypto/objects')
| -rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_dat.pl | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 5d983e3ed4..4534dc0985 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
| @@ -462,7 +462,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
| 462 | if (i > 2) i=2; | 462 | if (i > 2) i=2; |
| 463 | l-=(long)(i*40); | 463 | l-=(long)(i*40); |
| 464 | 464 | ||
| 465 | sprintf(tbuf,"%d.%lu",i,l); | 465 | BIO_snprintf(tbuf,sizeof tbuf,"%d.%lu",i,l); |
| 466 | i=strlen(tbuf); | 466 | i=strlen(tbuf); |
| 467 | BUF_strlcpy(buf,tbuf,buf_len); | 467 | BUF_strlcpy(buf,tbuf,buf_len); |
| 468 | buf_len-=i; | 468 | buf_len-=i; |
| @@ -473,7 +473,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
| 473 | for (; idx<len; idx++) { | 473 | for (; idx<len; idx++) { |
| 474 | l|=p[idx]&0x7f; | 474 | l|=p[idx]&0x7f; |
| 475 | if (!(p[idx] & 0x80)) { | 475 | if (!(p[idx] & 0x80)) { |
| 476 | sprintf(tbuf,".%lu",l); | 476 | BIO_snprintf(tbuf,sizeof tbuf,".%lu",l); |
| 477 | i=strlen(tbuf); | 477 | i=strlen(tbuf); |
| 478 | if (buf_len > 0) | 478 | if (buf_len > 0) |
| 479 | BUF_strlcpy(buf,tbuf,buf_len); | 479 | BUF_strlcpy(buf,tbuf,buf_len); |
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl index 5dfb84ea00..d0371661f9 100644 --- a/src/lib/libcrypto/objects/obj_dat.pl +++ b/src/lib/libcrypto/objects/obj_dat.pl | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | #!/usr/local/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | 2 | ||
| 3 | # fixes bug in floating point emulation on sparc64 when | ||
| 4 | # this script produces off-by-one output on sparc64 | ||
| 5 | use integer; | ||
| 6 | |||
| 3 | sub obj_cmp | 7 | sub obj_cmp |
| 4 | { | 8 | { |
| 5 | local(@a,@b,$_,$r); | 9 | local(@a,@b,$_,$r); |
