I think it's going to be a little bit further than the end of our magnetosphere, all it takes for an EMP to form is a strong enough burst of x-rays to hit a gas cloud, creating plasma, and a magnetic field to convey electrons from this plasma cloud down to LEO (or wherever we don't want it).
I believe our safe distance would be outside of our magnetosphere (~15 Earth radii facing Sun) plus some kind of a safe margin to ensure that the x-ray burst would be weak enough when it reaches the magnetosphere.
garyw, oh, fair enough then (the misunderstanding was caused by different meanings of unquantified sentences in English and Czech, in this case the meaning was supposed to be ...while some EMPs... lesson learned).