P V Sindhu survived a scare before beating unheralded compatriot Ira Sharma in three games to enter the women's singles quarter-finals at the Syed Modi International Super 300 badminton tournament.