From 05fdf38750312348c438bc2f246aca45007f924b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 8 Jul 2020 18:27:47 +0100 Subject: [PATCH] coverity: force amount to 0 before read call --- lib/roles/http/server/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index 0baba256f..709f1c394 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -2902,6 +2902,7 @@ int lws_serve_http_file_fragment(struct lws *wsi) poss -= 10 + 128; } + amount = 0; if (lws_vfs_file_read(wsi->http.fop_fd, &amount, p, poss) < 0) goto file_had_it; /* caller will close */