Securing media parsing code