coverity#1242908 Untrusted value as argument

Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b