Commits

Anonymous committed 9a24816

Crashfix: in ll_safe_string not only guard against 0 pointer, but against illegal length of buffer too.

  • Participants
  • Parent commits 8a65fed

Comments (0)

Files changed (1)

indra/llcommon/llstring.cpp

 
 std::string ll_safe_string(const char* in, S32 maxlen)
 {
-	if(in) return std::string(in, maxlen);
+	if(in && maxlen > 0 ) return std::string(in, maxlen);
+
 	return std::string();
 }