HTTP Range header may be in the form 'bytes=12345-' (no end offset)

This commit is contained in:
ejurgensen 2014-02-03 22:02:20 +01:00
parent 4842751527
commit 3064509f62

View File

@ -341,7 +341,7 @@ httpd_stream_file(struct evhttp_request *req, int id)
else
{
param_end = strchr(param, '-');
if (param_end)
if (param_end && (strlen(param_end) > 1))
{
ret = safe_atoi64(param_end + 1, &end_offset);
if (ret < 0)