RESTRICT AUTOMERGE: Fix heap buffer overflow am: 8adcfda134
am: 52eb1741ce

Change-Id: Ibde1932b835e2819ebd8b703ea6c8564ff5c9487