If it were a one-time thing, I'd chalk it up to someone having a bad day and just go on. If that sort of thing happened pretty often, I'd quietly mention the comments to the person's manager. I'm non-confrontational enough that I'd have trouble talking to the person specifically.