Skip to content

Commit 092a554

Browse files
committed
CID900783: LOCK_EVASION
1 parent 9821e59 commit 092a554

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

lib/core-net/close.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,6 @@ lws_addrinfo_clean(struct lws *wsi)
409409
static void
410410
lws_async_worker_wait_and_reap(struct lws *wsi)
411411
{
412-
if (!wsi->async_worker_job)
413-
return;
414412

415413
while (1) {
416414
pthread_mutex_lock(&wsi->a.context->async_worker_mutex);

lib/system/async-dns/async-dns-parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ lws_adns_iterate(lws_adns_q_t *q, const uint8_t *pkt, int len,
263263
/* carefully validate the claimed RR payload length */
264264

265265
rrpaylen = lws_ser_ru16be(&p[8]);
266-
if (p + 10 + rrpaylen > e) { /* it may be == e */
266+
if (rrpaylen > len || p + 10 + rrpaylen > e) { /* it may be == e */
267267
lwsl_notice("%s: invalid RR data length\n", __func__);
268268

269269
return -1;

0 commit comments

Comments
 (0)