From my experience, and what I can gather from professional journals (can't link) is that the "war on drugs" is most responsible for the supposed "overdose" deaths, and most of those are not from an overdose of narcotics. Most are the result of taking narcotics along with other drugs, notably alcohol. There are usually more than these two substances involved, and the alcohol is the true killer. Alcohol causes anything else ingested to be absorbed faster and made biologically available faster. Thus the potency of the narcotic can be boosted many times.
The second reason, again purely a function of the prohibition, is that "street drugs" can and may be diluted with pretty much anything, many of those things being directly toxic or even deadly... though the smart dealers won't be doing things deliberately to kill their customers, of course. But a baggie of cocaine, for example, intended to be taken orally (or by nose), might instead be mistaken for something that can be injected. In that case, it might well be lethal.
And we all know that a great cause of the violence that surrounds drug dealing (and to a lesser extent, use), is that there is no rational recourse for disputes. To whom would one complain or how else would one seek restitution? If you got the bad stuff in a pharmacy, or from a grower in a free market, there would be many safer and reasonable options. Even for the few true "addicts."
Edit: Forgot to mention that the reports of these "overdose deaths" make little or no mention of what else was taken. They also don't begin to relate the effect of the drug on people who are malnourished, or otherwise in poor health. The poison is in the dose, but also in the overall condition of the person who ingests it.