The safest response to an aggressive dog is to remain still. (Schools teach kids to "be a tree.") Avoid eye contact and be silent. If a dog attacks, roll into a ball ("be a rock"). Running, yelling, direct eye contact and moving your arms are all likely to make things more dangerous.
Source: Newhouse News Service