fix error checking in pthread_getname_np
commit3eed6a6f0a400763313bc5dca6e3b22a75166dbe
authorÉrico Nogueira <ericonr@disroot.org>
Sat, 10 Jul 2021 03:24:59 +0000 (10 00:24 -0300)
committerRich Felker <dalias@aerifal.cx>
Fri, 6 Aug 2021 15:26:15 +0000 (6 11:26 -0400)
tree65c107bccdadc07a07db7fb4d8e7bd3b75f92774
parent3f701faace7addc75d16dea8a6cd769fa5b3f260
fix error checking in pthread_getname_np

len is unsigned and can never be smaller than 0. though unlikely, an
error in read() would have lead to an out of bounds write to name.

Reported-by: Michael Forney <mforney@mforney.org>
src/thread/pthread_getname_np.c