1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

COVA10081: ensure m can never be negative

This commit is contained in:
Andy Green 2019-07-13 11:54:40 -07:00
parent 1929f3a6c0
commit e07d6986ab

View file

@ -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