From ef84a12d8fc3f2dacb57102d5f84bfb4025a320a Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 3 Jul 2019 03:24:04 +0000 Subject: snprintf/vsnprintf return < 0 on error, rather than -1. --- src/usr.bin/openssl/apps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/usr.bin/openssl/apps.c') diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 47e21265af..39ce7a5f34 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.52 2019/06/28 13:35:02 deraadt Exp $ */ +/* $OpenBSD: apps.c,v 1.53 2019/07/03 03:24:02 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -1328,7 +1328,7 @@ save_serial(char *serialfile, char *suffix, BIGNUM *serial, else n = snprintf(serialpath, sizeof serialpath, "%s.%s", serialfile, suffix); - if (n == -1 || n >= sizeof(serialpath)) { + if (n < 0 || n >= sizeof(serialpath)) { BIO_printf(bio_err, "serial too long\n"); goto err; } -- cgit v1.2.3-55-g6feb