[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] httpd.c: serve to range_end or end of file, whichever is smaller
From: Rob Walker <rwalker () codeaurora ! org>
Date: 2012-03-20 16:19:20
Message-ID: 4F68AE08.6010705 () codeaurora ! org
[Download RAW message or body]
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, i
}
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
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic