Skip to content

Ensure "wrap" variable is non-NULL

Michal Nowak requested to merge 4077-add-RUNTIME_CHECK-around-wrap into main

RUNTIME_CHECK on the wrap variable avoids possible NULL dereference:

thread.c: In function 'thread_wrap':
thread.c:60:15: error: dereference of possibly-NULL 'wrap' [CWE-690] [-Werror=analyzer-possible-null-dereference]
   60 |         *wrap = (struct thread_wrap){

The RUNTIME_CHECK was there before 7d1ceaf3.

Closes #4077 (closed)

Merge request reports