Skip to content

Commit b73dacf

Browse files
Update src/Http/Http.Extensions/src/SendFileResponseExtensions.cs
Co-authored-by: Andrew Casey <amcasey@users.noreply.github.com>
1 parent da49273 commit b73dacf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Http/Http.Extensions/src/SendFileResponseExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ private static void CheckRange(long offset, long? count, long fileLength)
128128
ArgumentOutOfRangeException.ThrowIfGreaterThan(offset, fileLength);
129129
if (count is {} countValue)
130130
{
131+
ArgumentOutOfRangeException.ThrowIfLessThan(countValue, 0, nameof(count));
131132
ArgumentOutOfRangeException.ThrowIfGreaterThan(countValue, fileLength - offset, nameof(count));
132133
}
133134
}

0 commit comments

Comments
 (0)