From afe7d0ac9632d5bf1a61d66f830a0dfd8d236826 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 18 Apr 2014 19:38:26 +0000 Subject: [PATCH] Shrink a local buffer to the size it really needs to be; this is the only discrepancy found while checking proper {HEX,DECIMAL}_SIZE macro usage, which is confusing enough. tweaks and ok jca@, ok guenther@ --- lib/libcrypto/objects/obj_dat.c | 2 +- lib/libssl/src/crypto/objects/obj_dat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c index 641a97c8aa8..cf4db7c6b5c 100644 --- a/lib/libcrypto/objects/obj_dat.c +++ b/lib/libcrypto/objects/obj_dat.c @@ -469,7 +469,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) BIGNUM *bl; unsigned long l; const unsigned char *p; - char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; + char tbuf[DECIMAL_SIZE(l) + 1]; if ((a == NULL) || (a->data == NULL)) { buf[0]='\0'; diff --git a/lib/libssl/src/crypto/objects/obj_dat.c b/lib/libssl/src/crypto/objects/obj_dat.c index 641a97c8aa8..cf4db7c6b5c 100644 --- a/lib/libssl/src/crypto/objects/obj_dat.c +++ b/lib/libssl/src/crypto/objects/obj_dat.c @@ -469,7 +469,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) BIGNUM *bl; unsigned long l; const unsigned char *p; - char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; + char tbuf[DECIMAL_SIZE(l) + 1]; if ((a == NULL) || (a->data == NULL)) { buf[0]='\0'; -- 2.20.1