I understand that sometimes things can get uncomfortable quickly. A couple years ago, waiting for the bus, a person who obviously had intellectual and social challenges came up to me, smile on her face, and told me how she was recently raped. It was a hard moment, but I figured that she really was processing in her way. She was too simple to understand that this wasn't really ever spoken about in public, certainly not with strangers. She probably just saw me, thought I seemed nice with a toddler child, and felt safe.
Reflective listening techniques, simple validation, are what I do in that situation when the person seems relatively safe.
There are a lot of hurt people who don't have resources and haven't been taught boundaries. Some are just lonely. I ride the bus and have heard a lot of stories-- none of them solicited. Like Mama Duck, it's easy to tell who is just socially inept and who is perhaps under the influence and/or worth being wary of. I let those gut instincts guide me and have been fine. An older man sharing a memory of the love of his life is just about the most benign of those interactions-- I would be a bit touched, honestly. When someone is expressing the tenderness of their heart-- it's hard to sit with their sadness, but what a blessing, sometimes, to have that opportunity too.
I would hope that if I was so desperate for someone to talk to, the world would be kind to me. You never know what life will throw at you.