Copy the string into masterPassword because the line is getting free'd.