High court overturns conviction of substance addict due to legal technicality