RESTRICT AUTOMERGE Fix heap buffer overflow
am: 5aee254181  -s ours

Change-Id: If12a5f1e937892322763485fc3a6bdfadb0707f9