diff options
author | 2019-07-03 03:24:01 +0000 | |
---|---|---|
committer | 2019-07-03 03:24:01 +0000 | |
commit | 515e489c3d599b9cfcdf9cf6842ac49f92e154d6 (patch) | |
tree | 9ce211473951e1baf5c99e08c2c35012292670f1 /lib/libc/asr/asr_debug.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/libc/asr/asr_debug.c')
-rw-r--r-- | lib/libc/asr/asr_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/asr/asr_debug.c b/lib/libc/asr/asr_debug.c index 141517b8360..9fc5857ebde 100644 --- a/lib/libc/asr/asr_debug.c +++ b/lib/libc/asr/asr_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asr_debug.c,v 1.25 2018/04/28 15:16:49 schwarze Exp $ */ +/* $OpenBSD: asr_debug.c,v 1.26 2019/07/03 03:24:03 deraadt Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -73,7 +73,7 @@ print_rr(const struct asr_dns_rr *rr, char *buf, size_t max) rr->rr_ttl, __p_class(rr->rr_class), __p_type(rr->rr_type)); - if (r == -1) { + if (r < 0 || r >= max) { buf[0] = '\0'; return (buf); } |