diff options
author | inoguchi <> | 2016-12-22 16:57:38 +0000 |
---|---|---|
committer | inoguchi <> | 2016-12-22 16:57:38 +0000 |
commit | 226832254dfa92aaeade5677a07849108c872d02 (patch) | |
tree | 6b8f5383568217a3b30087a9ad76f5380f536f47 | |
parent | c0effee5bc1f5cdc6f4668d160e173746cbbf7de (diff) | |
download | openbsd-226832254dfa92aaeade5677a07849108c872d02.tar.gz openbsd-226832254dfa92aaeade5677a07849108c872d02.tar.bz2 openbsd-226832254dfa92aaeade5677a07849108c872d02.zip |
OBJ_obj2txt() should return the total amount of space required
reported by @rhenium on GitHub
ok jsing@
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 1ae38bc4e8..1d6207072d 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: obj_dat.c,v 1.36 2016/07/17 21:23:50 bcook Exp $ */ | 1 | /* $OpenBSD: obj_dat.c,v 1.37 2016/12/22 16:57:38 inoguchi Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -552,10 +552,6 @@ OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
552 | ret++; | 552 | ret++; |
553 | } | 553 | } |
554 | 554 | ||
555 | if (buf_len <= 0) { | ||
556 | ret = 0; | ||
557 | goto out; | ||
558 | } | ||
559 | if (use_bn) { | 555 | if (use_bn) { |
560 | char *bndec; | 556 | char *bndec; |
561 | 557 | ||