That's one of the classic inspection Easter Eggs to look for, whether or not that intersection is flashed properly on a roof.
Do a google image search for kickout or diverter flashing, and start reading. One of my favorite resources is the government, because it's free. The EPA has a massive indoor air quality technical repository on the web, and part of it includes roofing. Here's the link for what they recommend at that intersection:
http://www.epa.gov/indoorairplus/tec...sture/1_8.html
Flashing manufacturers have various systems, all similar in concept to what the EPA shows, but it's worth looking into it more.