From c3c767549bbfec3c068eb2a5814167f8f4d95412 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 10 Nov 2014 19:53:41 +0100 Subject: [PATCH] http streaming: DVR file - fix wrong lseek check --- src/webui/webui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/webui.c b/src/webui/webui.c index eba5dbb6..abd79b0d 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -1172,7 +1172,7 @@ page_dvrfile(http_connection_t *hc, const char *remain, void *opaque) file_start, file_end, (size_t)st.st_size); if(file_start > 0) - if (lseek(fd, file_start, SEEK_SET)) { + if (lseek(fd, file_start, SEEK_SET) != file_start) { close(fd); return HTTP_STATUS_INTERNAL; }