diff --git a/intl/unicharutil/util/nsBidiUtils.cpp b/intl/unicharutil/util/nsBidiUtils.cpp index 5af5e2620ead..111eb81a1db6 100644 --- a/intl/unicharutil/util/nsBidiUtils.cpp +++ b/intl/unicharutil/util/nsBidiUtils.cpp @@ -255,7 +255,7 @@ nsresult ArabicShaping(const PRUnichar* aString, PRUint32 aLen, PRUnichar* aBuf, PRUint32 *aBufLen, PRBool aInputLogical, PRBool aOutputLogical) { - nsAutoString tempString(aString); + nsAutoString tempString(aString, aLen); PRUnichar *tempBuf = NS_CONST_CAST(PRUnichar*, tempString.get()); if (aInputLogical) { ReverseString(tempBuf, aLen);