byannoni / qthreads

A POSIX thread wrapper using a pool and queues of functions for C and (soon) C++
Apache License 2.0
1 stars 1 forks source link

Null pointer dereference in pt_strncpy() #60

Closed byannoni closed 8 years ago

byannoni commented 8 years ago

The pointer src is dereferenced before it is checked. Initialize len to 0 and then assign the calculated length after checking.