mirror of
https://github.com/sigoden/dufs.git
synced 2026-06-07 15:59:03 +03:00
fix: http range underflow (#690)
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ pub fn parse_range(range: &str, size: u64) -> Option<Vec<(u64, u64)>> {
|
||||
result.push((start, size - 1));
|
||||
} else {
|
||||
let end = end.parse::<u64>().ok()?;
|
||||
if end < size {
|
||||
if end < size && start <= end {
|
||||
result.push((start, end));
|
||||
} else {
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user