| Index: Source/wtf/text/StringBuffer.h
|
| diff --git a/Source/wtf/text/StringBuffer.h b/Source/wtf/text/StringBuffer.h
|
| index 9af42dc23666528f2faa999d81d0ea723af218f5..74ad12f6070d19bc9fd5661c568c08894702cc36 100644
|
| --- a/Source/wtf/text/StringBuffer.h
|
| +++ b/Source/wtf/text/StringBuffer.h
|
| @@ -70,7 +70,7 @@ public:
|
| }
|
|
|
| unsigned length() const { return m_data->length(); }
|
| - CharType* characters() { return const_cast<CharType*>(m_data->getCharacters<CharType>()); }
|
| + CharType* characters() { return length() ? const_cast<CharType*>(m_data->getCharacters<CharType>()) : 0; }
|
|
|
| CharType& operator[](unsigned i) { ASSERT_WITH_SECURITY_IMPLICATION(i < length()); return characters()[i]; }
|
|
|
|
|