From e07d6986ab1b33dcbd7ed33bbf6e8ded3f29764d Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 13 Jul 2019 11:54:40 -0700 Subject: [PATCH] COVA10081: ensure m can never be negative --- lib/core-net/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core-net/output.c b/lib/core-net/output.c index e7d05562a..b329f8018 100644 --- a/lib/core-net/output.c +++ b/lib/core-net/output.c @@ -129,6 +129,9 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len) break; } + if ((int)m < 0) + m = 0; + /* * we were sending this from buflist_out? Then not sending everything * is a small matter of advancing ourselves only by the amount we did