Cubs are always a bad mix. I have ran across cubs in the past, never saw mom until a little later (followed me for a distance), but as soon as I saw the cubs I headed back. The friend I was with, not a big outdoor person, thought it was cool and wondered why I was concerned and insisted on leaving. He found out a few minutes later as mom popped out on the trail about 200 yards away and followed us down the mountain about quarter of the way before turning back.
In my opinion guns are great noise makers, but if its a true maul situation you probably would not be able to get a shot off until the animal was on top of you, and even then a handgun, unless you get a lucky shot, won't make a difference as it tears the hell out of you. Even a human, mortally wounded can keep fighting for up to 1/2 a minute before dropping. At least that is my opinion... you would be better off buying a boat air horn at walmart for noise making or scaring animals away.