diff options
Diffstat (limited to 'lib/libcrypto/ts/ts_lib.c')
-rw-r--r-- | lib/libcrypto/ts/ts_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/ts/ts_lib.c b/lib/libcrypto/ts/ts_lib.c index 81a5f23cd53..b9d92a3012b 100644 --- a/lib/libcrypto/ts/ts_lib.c +++ b/lib/libcrypto/ts/ts_lib.c @@ -92,9 +92,10 @@ TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj) char obj_txt[128]; int len = OBJ_obj2txt(obj_txt, sizeof(obj_txt), obj, 0); + if (len >= sizeof(obj_txt)) + len = sizeof(obj_txt) - 1; BIO_write(bio, obj_txt, len); BIO_write(bio, "\n", 1); - return 1; } |