A majority of the justices voiced concerns that the law may be overbroad, lumping together occasional drug users with addicts who threaten public safety.