From 3064509f629a1cd61e7d1032d9cf4736733c06a9 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 3 Feb 2014 22:02:20 +0100 Subject: [PATCH] HTTP Range header may be in the form 'bytes=12345-' (no end offset) --- src/httpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpd.c b/src/httpd.c index 02ad8b31..e1033163 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -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)