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/s_time.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/s_time.c')
-rw-r--r-- | src/usr.bin/openssl/s_time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/s_time.c b/src/usr.bin/openssl/s_time.c index 1506ca356a..3263a2dff3 100644 --- a/src/usr.bin/openssl/s_time.c +++ b/src/usr.bin/openssl/s_time.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_time.c,v 1.32 2018/09/17 15:37:35 cheloha Exp $ */ | 1 | /* $OpenBSD: s_time.c,v 1.33 2019/07/03 03:24:02 deraadt Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -377,7 +377,7 @@ run_test(SSL *scon) | |||
377 | if (s_time_config.www_path != NULL) { | 377 | if (s_time_config.www_path != NULL) { |
378 | retval = snprintf(buf, sizeof buf, | 378 | retval = snprintf(buf, sizeof buf, |
379 | "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path); | 379 | "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path); |
380 | if (retval == -1 || retval >= sizeof buf) { | 380 | if (retval < 0 || retval >= sizeof buf) { |
381 | fprintf(stderr, "URL too long\n"); | 381 | fprintf(stderr, "URL too long\n"); |
382 | return 0; | 382 | return 0; |
383 | } | 383 | } |