I could not follow where the leaf_hash is used carefully enough to figure out exactly how dangerous this is in the broader context and taking future evolution into account. But it's clearly safe as it is used now because all expected inputs have the same length.
Where are blockchains widely used nowadays, pray tell?
That's all I can think of, though.