In any dealings with the local police it will pay to be deferential. You’re most likely to come into contact with them either through reporting a crime (some of the big cities in Malaysia have tourist police stations for this purpose) or while driving. Minor misdemeanours may be overlooked, but don’t count on it.
Drug trafficking carries a mandatory death penalty. A number of foreigners have been executed in Malaysia, some of them for possession of amazingly small quantities of heroin. Even possession of tiny amounts of classified drugs can bring down a lengthy jail sentence and a beating with the rotan (cane). Just don’t do it.