diff options
Diffstat (limited to 'src/lib/libcrypto/ts')
| -rw-r--r-- | src/lib/libcrypto/ts/ts_rsp_verify.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_verify.c b/src/lib/libcrypto/ts/ts_rsp_verify.c index a003207428..f241230ef4 100644 --- a/src/lib/libcrypto/ts/ts_rsp_verify.c +++ b/src/lib/libcrypto/ts/ts_rsp_verify.c | |||
| @@ -538,7 +538,6 @@ static char *TS_get_status_text(STACK_OF(ASN1_UTF8STRING) *text) | |||
| 538 | int i; | 538 | int i; |
| 539 | unsigned int length = 0; | 539 | unsigned int length = 0; |
| 540 | char *result = NULL; | 540 | char *result = NULL; |
| 541 | char *p; | ||
| 542 | 541 | ||
| 543 | /* Determine length first. */ | 542 | /* Determine length first. */ |
| 544 | for (i = 0; i < sk_ASN1_UTF8STRING_num(text); ++i) | 543 | for (i = 0; i < sk_ASN1_UTF8STRING_num(text); ++i) |
| @@ -554,17 +553,14 @@ static char *TS_get_status_text(STACK_OF(ASN1_UTF8STRING) *text) | |||
| 554 | return NULL; | 553 | return NULL; |
| 555 | } | 554 | } |
| 556 | /* Concatenate the descriptions. */ | 555 | /* Concatenate the descriptions. */ |
| 557 | for (i = 0, p = result; i < sk_ASN1_UTF8STRING_num(text); ++i) | 556 | result[0] = '\0'; |
| 557 | for (i = 0; i < sk_ASN1_UTF8STRING_num(text); ++i) | ||
| 558 | { | 558 | { |
| 559 | ASN1_UTF8STRING *current = sk_ASN1_UTF8STRING_value(text, i); | 559 | ASN1_UTF8STRING *current = sk_ASN1_UTF8STRING_value(text, i); |
| 560 | length = ASN1_STRING_length(current); | 560 | if (i > 0) |
| 561 | if (i > 0) *p++ = '/'; | 561 | strlcat(result, "/", length); |
| 562 | strncpy(p, (const char *)ASN1_STRING_data(current), length); | 562 | strlcat(result, ASN1_STRING_data(current), length); |
| 563 | p += length; | ||
| 564 | } | 563 | } |
| 565 | /* We do have space for this, too. */ | ||
| 566 | *p = '\0'; | ||
| 567 | |||
| 568 | return result; | 564 | return result; |
| 569 | } | 565 | } |
| 570 | 566 | ||
