bugfixes & refactoring

This commit is contained in:
2019-10-26 12:35:01 -04:00
parent 564a17a8fa
commit c3b7a05dde
21 changed files with 440 additions and 225 deletions

View File

@@ -153,7 +153,7 @@ int chunked_response_file(const char *filename, const char *mime,
// %d-
ends = MIN(starts + CHUNK_SIZE, length);
}
if (ends >= length || starts >= length || starts < 0) {
if (ends > length || starts >= length || starts < 0) {
close(fd);
return OCS_INTERNAL_ERROR;
}