From: miod Date: Fri, 18 Apr 2014 19:38:26 +0000 (+0000) Subject: Shrink a local buffer to the size it really needs to be; this is the only X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=afe7d0ac9632d5bf1a61d66f830a0dfd8d236826;p=openbsd 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@ --- 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';