My question would be what caused the leak for the roof membrane to be cut so cleanly. If it is a problem that membrane is to short, then entire trim strip portably needs to removed. Dry out the area below, them put Eternbond along edge and put trim back.
Any time you have a leak, the water needs to be removed, as it will continue to cause deterioration and rot in wood. Also water could have gotten into the wall too.
Dr Quick