Page MenuHomePhabricator

Usage of `strerror` is not thread-safe
Open, NormalPublic

Description

libssh is generally thread-safe so long as users stick to accessing a given ssh_session object from a single thread.

However there are usages of strerror throughout the codebase and there are no guarantees that strerror itself is thread-safe.

To fix this I think perhaps an ssh_strerror function can be used instead, and the implementation of that can be wrapped with strerror_r or equivalent depending on platform.

Event Timeline

simonsj created this task.Jun 28 2018, 6:50 AM
simonsj triaged this task as Normal priority.