Merge "init: Fix memory corruption when sanitizing platform paths"