The best thing to do, if you have time is too take off an article of clothing and wrap it around your arm and offer it to the canine assassin.
In lieu of time and the reality of panic-strickeness your adrenaline is your friend. You can use it to run (which will signal to the dog-"The hunt is on-that butt looks real juicy!) or you can try and intimidate the little Cujo by tensing up as stilly as possible and letting out your lowest deepest growl. This says to the dog that you are not afraid and he might wonder why.
Others say to run at the dog but the reality is you will probably just take a few steps before he realizes how slow you are and heads for your achilles tendon.
My dog Xena has been the target of several attacks and a couple of times the fact that I stepped in front and quietly stared down the dog and growled has been enough to stop them in their tracks.
If this doesn't work I would suggest yelling things at the dog like: Stay! or No! Or, due to the lingo of most of the owners of these things: Giiiit ya mangy critter 'for aye strang ye up frum da neerus charee!