summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c
index 6c50aa980a..c0b63e4d85 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.41 2018/09/08 13:49:26 tb Exp $ */ 1/* $OpenBSD: obj_dat.c,v 1.42 2019/07/03 03:24:04 deraadt 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 *
@@ -608,7 +608,7 @@ OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
608 goto err; 608 goto err;
609 i = snprintf(buf, buf_len, ".%s", bndec); 609 i = snprintf(buf, buf_len, ".%s", bndec);
610 free(bndec); 610 free(bndec);
611 if (i == -1) 611 if (i < 0)
612 goto err; 612 goto err;
613 if (i >= buf_len) { 613 if (i >= buf_len) {
614 buf_len = 0; 614 buf_len = 0;
@@ -619,7 +619,7 @@ OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
619 ret += i; 619 ret += i;
620 } else { 620 } else {
621 i = snprintf(buf, buf_len, ".%lu", l); 621 i = snprintf(buf, buf_len, ".%lu", l);
622 if (i == -1) 622 if (i < 0)
623 goto err; 623 goto err;
624 if (i >= buf_len) { 624 if (i >= buf_len) {
625 buf_len = 0; 625 buf_len = 0;