safe STRING_MAXLEN -> -1 conversion

Change-Id: If07e632e81e1fda98f587b3c34b009144126d7ef