diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 70d78c77cdebffbe15c1425d75f46a80ffd8f96e..c376a73615caf4f1cfe5b3f86dd05871446bef84 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -139,6 +139,7 @@ class LLTextBase
 	// TODO: add optional style parameter
 	virtual void			setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style
 	virtual std::string		getText() const;
+	void					setMaxTextLength(S32 length) { mMaxTextByteLength = length; }
 
 	// wide-char versions
 	void					setWText(const LLWString& text);
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 0c23947a8ce99c62eefe08b8673e5e00e0f08e0e..48b68e4292f52f388ebb12bdc8047a2ae77cb936 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -128,6 +128,7 @@ mAddedDefaultBtn(false)
 	// *TODO: magic numbers(???) - copied from llnotify.cpp(250)
 	const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; 
 
+	mTextBox->setMaxTextLength(MAX_LENGTH);
 	mTextBox->setVisible(TRUE);
 	mTextBox->setValue(notification->getMessage());