A security officer in California allegedly overheard a "disgruntled student" threatening to shoot at a school, the Los Angeles County Sheriff's Office said.