Skip to content

glocalvfs: Use thread-safe getpwnam_r() rather than getpwnam()

Philip Withnall requested to merge pwithnall/glib:thread-safe-getpwnam into master

It’s possible that one VFS operation will happen from a worker thread at the same time as another is happening from the main thread, in which case the static buffer which getpwnam() uses will be overwritten. There’s a chance this will corrupt the results that one of the threads receives.

Fix that by using the thread-safe getpwnam_r() version.

Signed-off-by: Philip Withnall withnall@endlessm.com

#1687 (closed)

Merge request reports