The Book of Medicine of his Sahih, Al-Bukhari recorded that `Aishah رضي الله عنها said, “The Messenger of Allah صلى الله عليه وسلم was bewitched until he thought that he had relations with his wives, but he had not had relations with them.” Sufyan said, “This is the worst form of magic when it reaches this stage.
So the Prophet صلى الله عليه وسلم said, (O `A’ishah! Do you know that Allah has answered me concerning that which I asked Him Two men came to me and one of them sat by my head while the other sat by my feet. The one who was sitting by my head said to the other one, `What is wrong with this man’ The other replied, `He is bewitched.’ The first one said, `Who bewitched him’ The other replied, `Labid bin A`sam. He is a man from the tribe of Banu Zurayq who is an ally of the Jews, and a hypocrite.’ The first one asked, `With what (did he bewitch him)’ The other replied, `With a comb and hair from the comb.’ The first one asked, `Where (is the comb)’ The other answered, `In the dried bark of a male date palm under a rock in a well called Dharwan.’) `A’ishah said, “So he went to the well to remove it (the comb with the hair). Then he said, (This is the well that I saw. It was as if its water had henna soaked in it and its palm trees were like the heads of devils.) So he removed it (of the well). Then I (`A’ishah) said, `Will you not make this public’ He replied, (Allah has cured me and I hate to spread (the news of) wickedness to any of the people.)”
This magic had effect on Prophet صلى الله عليه وسلم . it was like all the other diseases that the Prophet صلى الله عليه وسلم was inflicted with and protected from. As for the Quran, sunnah or Islamic law in general, they are guarded from any distortion by Allah.