mirror of https://github.com/OISF/suricata
threads: avoid NULL-ptr deref in thread init wait
** CID 1426745: Null pointer dereferences (FORWARD_NULL)
/src/tm-threads.c: 2135 in TmThreadWaitOnThreadInit()
________________________________________________________________________________________________________
*** CID 1426745: Null pointer dereferences (FORWARD_NULL)
/src/tm-threads.c: 2135 in TmThreadWaitOnThreadInit()
2129 struct timeval cur_ts;
2130 gettimeofday(&start_ts, NULL);
2131
2132 again:
2133 gettimeofday(&cur_ts, NULL);
2134 if ((cur_ts.tv_sec - start_ts.tv_sec) > 120) {
>>> CID 1426745: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "tv".
2135 SCLogError(SC_ERR_THREAD_INIT, "thread \"%s\" failed to "
2136 "initialize in time: flags %04x", tv->name,
2137 SC_ATOMIC_GET(tv->flags));
2138 return TM_ECODE_FAILED;
2139 }
2140
pull/3117/head
parent
f5b27ae767
commit
f2cacca9f8
Loading…
Reference in New Issue