diff options
author | deraadt <> | 2019-07-03 03:24:04 +0000 |
---|---|---|
committer | deraadt <> | 2019-07-03 03:24:04 +0000 |
commit | ef84a12d8fc3f2dacb57102d5f84bfb4025a320a (patch) | |
tree | 095ed8468464d046dbf7618376c0a18af76dceba /src/usr.bin/openssl/apps.c | |
parent | 88ab3711341dea97a3118b0654ceab1679d5e0a1 (diff) | |
download | openbsd-ef84a12d8fc3f2dacb57102d5f84bfb4025a320a.tar.gz openbsd-ef84a12d8fc3f2dacb57102d5f84bfb4025a320a.tar.bz2 openbsd-ef84a12d8fc3f2dacb57102d5f84bfb4025a320a.zip |
snprintf/vsnprintf return < 0 on error, rather than -1.
Diffstat (limited to 'src/usr.bin/openssl/apps.c')
-rw-r--r-- | src/usr.bin/openssl/apps.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: apps.c,v 1.52 2019/06/28 13:35:02 deraadt Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.53 2019/07/03 03:24:02 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -1328,7 +1328,7 @@ save_serial(char *serialfile, char *suffix, BIGNUM *serial, | |||
1328 | else | 1328 | else |
1329 | n = snprintf(serialpath, sizeof serialpath, "%s.%s", | 1329 | n = snprintf(serialpath, sizeof serialpath, "%s.%s", |
1330 | serialfile, suffix); | 1330 | serialfile, suffix); |
1331 | if (n == -1 || n >= sizeof(serialpath)) { | 1331 | if (n < 0 || n >= sizeof(serialpath)) { |
1332 | BIO_printf(bio_err, "serial too long\n"); | 1332 | BIO_printf(bio_err, "serial too long\n"); |
1333 | goto err; | 1333 | goto err; |
1334 | } | 1334 | } |