diff --git a/mozilla/xpcom/string/src/nsTSubstring.cpp b/mozilla/xpcom/string/src/nsTSubstring.cpp index 1eb89b2de3b..4f82ffebee6 100644 --- a/mozilla/xpcom/string/src/nsTSubstring.cpp +++ b/mozilla/xpcom/string/src/nsTSubstring.cpp @@ -287,7 +287,7 @@ void nsTSubstring_CharT::Assign( const char_type* data, size_type length ) { // unfortunately, some callers pass null :-( - if (!data) + if (!data || length == 0) { Truncate(); return;