If the length of the string is zero, the pointer to the buffer may be null. ASAN flags these as invalid/undefined, so don't do that. Change-Id: Ic55498465c53a78e1bd44c42d1a60f9bd3336473