diff options
author | 2019-07-03 03:24:01 +0000 | |
---|---|---|
committer | 2019-07-03 03:24:01 +0000 | |
commit | 515e489c3d599b9cfcdf9cf6842ac49f92e154d6 (patch) | |
tree | 9ce211473951e1baf5c99e08c2c35012292670f1 /lib/libcrypto/objects/obj_dat.c | |
parent | sync (diff) | |
download | wireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.tar.xz wireguard-openbsd-515e489c3d599b9cfcdf9cf6842ac49f92e154d6.zip |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'lib/libcrypto/objects/obj_dat.c')
-rw-r--r-- | lib/libcrypto/objects/obj_dat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c index 6c50aa980aa..c0b63e4d852 100644 --- a/lib/libcrypto/objects/obj_dat.c +++ b/lib/libcrypto/objects/obj_dat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_dat.c,v 1.41 2018/09/08 13:49:26 tb Exp $ */ +/* $OpenBSD: obj_dat.c,v 1.42 2019/07/03 03:24:04 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -608,7 +608,7 @@ OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) goto err; i = snprintf(buf, buf_len, ".%s", bndec); free(bndec); - if (i == -1) + if (i < 0) goto err; if (i >= buf_len) { buf_len = 0; @@ -619,7 +619,7 @@ OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) ret += i; } else { i = snprintf(buf, buf_len, ".%lu", l); - if (i == -1) + if (i < 0) goto err; if (i >= buf_len) { buf_len = 0; |