coverity#1213364 Untrusted pointer write

Change-Id: I63c670e6f2196f8e8743923b0a0bf676fb476ed7