Merge "add null pointer check for msg buffer" am: f03f2a5cd7
am: a3e4876715

Change-Id: I039c5cccf74a1ad878ea7752918ed6d5b40552ea