diff options
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/ts/ts_rsp_sign.c | 4 |
2 files changed, 5 insertions, 5 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; |
diff --git a/src/lib/libcrypto/ts/ts_rsp_sign.c b/src/lib/libcrypto/ts/ts_rsp_sign.c index 9ab80160b3..6125fdd4be 100644 --- a/src/lib/libcrypto/ts/ts_rsp_sign.c +++ b/src/lib/libcrypto/ts/ts_rsp_sign.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ts_rsp_sign.c,v 1.22 2018/05/13 15:04:05 tb Exp $ */ | 1 | /* $OpenBSD: ts_rsp_sign.c,v 1.23 2019/07/03 03:24:04 deraadt Exp $ */ |
2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL | 2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL |
3 | * project 2002. | 3 | * project 2002. |
4 | */ | 4 | */ |
@@ -1001,7 +1001,7 @@ TS_RESP_set_genTime_with_precision(ASN1_GENERALIZEDTIME *asn1_time, | |||
1001 | "%04d%02d%02d%02d%02d%02d%sZ", | 1001 | "%04d%02d%02d%02d%02d%02d%sZ", |
1002 | tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, | 1002 | tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, |
1003 | tm->tm_hour, tm->tm_min, tm->tm_sec, usecstr); | 1003 | tm->tm_hour, tm->tm_min, tm->tm_sec, usecstr); |
1004 | if (rv == -1 || rv >= sizeof(genTime_str)) | 1004 | if (rv < 0 || rv >= sizeof(genTime_str)) |
1005 | goto err; | 1005 | goto err; |
1006 | 1006 | ||
1007 | /* Now call OpenSSL to check and set our genTime value */ | 1007 | /* Now call OpenSSL to check and set our genTime value */ |