summaryrefslogtreecommitdiff
path: root/networking/httpd.c
diff options
context:
space:
mode:
authorRob Walker2012-04-03 08:09:28 +0200
committerDenys Vlasenko2012-04-03 08:09:28 +0200
commit7a4269329fa05411b477b540beebf18af90e9b42 (patch)
treee55230dad08a9f811f7404dea1f1dafb510d4f62 /networking/httpd.c
parent1d9e99b399e72763045a2428e04b32278538ccc7 (diff)
downloadbusybox-7a4269329fa05411b477b540beebf18af90e9b42.zip
busybox-7a4269329fa05411b477b540beebf18af90e9b42.tar.gz
httpd: emit correct content length on range requests past the end. Closes 4952
Signed-off-by: Rob Walker <rwalker@codeaurora.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/httpd.c')
-rw-r--r--networking/httpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index f233cb0..fb6ecbf 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1594,7 +1594,7 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
}
range_len = MAXINT(off_t);
if (range_start >= 0) {
- if (!range_end) {
+ if (!range_end || range_end > file_size - 1) {
range_end = file_size - 1;
}
if (range_end < range_start