From 7ef4b2e1f256c9f0d3285bb391c68b67985c2e5c Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 13:00:47 +0800 Subject: [PATCH] coverity 83661 output check lseek return Signed-off-by: Andy Green --- lib/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/output.c b/lib/output.c index cee61494..846e3022 100644 --- a/lib/output.c +++ b/lib/output.c @@ -547,7 +547,8 @@ LWS_VISIBLE int libwebsockets_serve_http_file_fragment( if (m != n) /* adjust for what was not sent */ - compatible_file_seek_cur(wsi->u.http.fd, m - n); + if (compatible_file_seek_cur(wsi->u.http.fd, m - n) < 0) + return -1; } all_sent: if (!wsi->truncated_send_len &&