Page MenuHomePhabricator

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


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 triaged this task as Normal priority.Jun 28 2018, 6:50 AM
simonsj created this task.
Jakuje added a project: Restricted Project.Apr 16 2020, 12:37 PM
sahanaprasad07 edited projects, added Restricted Project; removed Restricted Project.Nov 19 2020, 7:06 PM