summaryrefslogtreecommitdiff
path: root/usr.bin/fetch/http.c
diff options
context:
space:
mode:
authorMartin Cracauer <cracauer@FreeBSD.org>2000-03-20 15:45:19 +0000
committerMartin Cracauer <cracauer@FreeBSD.org>2000-03-20 15:45:19 +0000
commit0d82a4031c572a7571a564e42492411a7cac004d (patch)
treead28da8478cc7861cb6524ba6dbea3e77e71a093 /usr.bin/fetch/http.c
parent96fbc99809a518107f3789ccb0c2d79ba7f41d90 (diff)
Notes
Diffstat (limited to 'usr.bin/fetch/http.c')
-rw-r--r--usr.bin/fetch/http.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c
index 4e19485a9f8f..fdb526a8ca9a 100644
--- a/usr.bin/fetch/http.c
+++ b/usr.bin/fetch/http.c
@@ -1027,7 +1027,12 @@ spewerror:
goto out;
status = errno; /* save errno for warn(), below, if needed */
- display(fs, total_length, -1); /* do here in case we have to warn */
+ if (display(fs, total_length, -1) != 0) {
+ /* Check for truncated file */
+ errno = status;
+ status = EX_PROTOCOL;
+ goto out;
+ }
errno = status;
if (ferror(remote)) {