diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.sbin/ocspcheck/ocspcheck.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr.sbin/ocspcheck/ocspcheck.c b/src/usr.sbin/ocspcheck/ocspcheck.c index 551a8fa091..41700f91a0 100644 --- a/src/usr.sbin/ocspcheck/ocspcheck.c +++ b/src/usr.sbin/ocspcheck/ocspcheck.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocspcheck.c,v 1.24 2017/12/01 14:42:23 visa Exp $ */ | 1 | /* $OpenBSD: ocspcheck.c,v 1.25 2019/05/15 13:44:18 bcook Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2017 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2017 Bob Beck <beck@openbsd.org> |
| @@ -670,7 +670,9 @@ main(int argc, char **argv) | |||
| 670 | * write out the DER format response to the staplefd | 670 | * write out the DER format response to the staplefd |
| 671 | */ | 671 | */ |
| 672 | if (staplefd >= 0) { | 672 | if (staplefd >= 0) { |
| 673 | (void) ftruncate(staplefd, 0); | 673 | while (ftruncate(staplefd, 0) < 0) |
| 674 | if (errno != EINTR && errno != EAGAIN) | ||
| 675 | err(1, "Write of OCSP response failed"); | ||
| 674 | w = 0; | 676 | w = 0; |
| 675 | written = 0; | 677 | written = 0; |
| 676 | while (written < instaplesz) { | 678 | while (written < instaplesz) { |
