diff options
| author | deraadt <> | 2019-07-03 03:24:04 +0000 |
|---|---|---|
| committer | deraadt <> | 2019-07-03 03:24:04 +0000 |
| commit | bdd1c0627cbfd4015db19da84ab1a24f50d9f6dc (patch) | |
| tree | 095ed8468464d046dbf7618376c0a18af76dceba /src/usr.bin/openssl/apps.c | |
| parent | 154e31023af7e0be306e0968992087fe0a23f907 (diff) | |
| download | openbsd-bdd1c0627cbfd4015db19da84ab1a24f50d9f6dc.tar.gz openbsd-bdd1c0627cbfd4015db19da84ab1a24f50d9f6dc.tar.bz2 openbsd-bdd1c0627cbfd4015db19da84ab1a24f50d9f6dc.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 | } |
