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

Buffer overrun in qtstrerror_r() #71

Closed byannoni closed 7 years ago

byannoni commented 7 years ago

The use of len - 1 in qtstrerror_r() could cause a buffer overrun in qtstrncpy() if len is 0.

byannoni commented 7 years ago

This is not possible because the procedure checks if length is 0 before copying.