三长两短: what's long and what's short?
Theory 1: A coffin is made of three long and two short pieces of wood. And a coffin means death, dangerous.

You also can find some clues in the wikipedia article about "使用筷子禁忌".

Theory 2: Taoist forecasts through burning incenses. It is the most dangerous condition that there are three long incense sticks and two short incense sticks after burning five incence sticks in some time.

Theory 3: In ancient times, a master swordmaker called Ouyezi (欧冶子) made five sharp swords. Three of them were long, the others were short. And an assassin used the one called "鱼肠剑" among the five swords to kill the ennemy King. So "三长两短" refers to coming across a dangerous accident.