diff options
author | miod <> | 2014-04-18 19:38:26 +0000 |
---|---|---|
committer | miod <> | 2014-04-18 19:38:26 +0000 |
commit | 698143c53d1a1e4fe680b08c6a68ab327f4b6c5d (patch) | |
tree | 62cd3fa70819b98bce9bfcd0d1989915dcfb20b1 /src | |
parent | 8dbae0a8035533f51ac9209fb63c83115875381e (diff) | |
download | openbsd-698143c53d1a1e4fe680b08c6a68ab327f4b6c5d.tar.gz openbsd-698143c53d1a1e4fe680b08c6a68ab327f4b6c5d.tar.bz2 openbsd-698143c53d1a1e4fe680b08c6a68ab327f4b6c5d.zip |
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@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/objects/obj_dat.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 641a97c8aa..cf4db7c6b5 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/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) | |||
469 | BIGNUM *bl; | 469 | BIGNUM *bl; |
470 | unsigned long l; | 470 | unsigned long l; |
471 | const unsigned char *p; | 471 | const unsigned char *p; |
472 | char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; | 472 | char tbuf[DECIMAL_SIZE(l) + 1]; |
473 | 473 | ||
474 | if ((a == NULL) || (a->data == NULL)) { | 474 | if ((a == NULL) || (a->data == NULL)) { |
475 | buf[0]='\0'; | 475 | buf[0]='\0'; |
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c index 641a97c8aa..cf4db7c6b5 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.c +++ b/src/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) | |||
469 | BIGNUM *bl; | 469 | BIGNUM *bl; |
470 | unsigned long l; | 470 | unsigned long l; |
471 | const unsigned char *p; | 471 | const unsigned char *p; |
472 | char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; | 472 | char tbuf[DECIMAL_SIZE(l) + 1]; |
473 | 473 | ||
474 | if ((a == NULL) || (a->data == NULL)) { | 474 | if ((a == NULL) || (a->data == NULL)) { |
475 | buf[0]='\0'; | 475 | buf[0]='\0'; |