Commit 36750594 authored by Gabriel Schulhof's avatar Gabriel Schulhof Committed by Rod Vagg
Browse files

n-api: guard against cond null dereference

A condition variable is only created by the thread-safe function if the
queue size is set to something larger than zero. This adds null-checks
around the condition variable and tests for the case where the queue
size is zero.

Fixes: https://github.com/nodejs/help/issues/1387
PR-URL: https://github.com/nodejs/node/pull/21871
Backport-PR-URL: https://github.com/nodejs/node/pull/25002


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent c5a11dc5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment