diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 441299a4a6f..bba7d083f84 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -481,12 +481,12 @@ static PRBool TamilToText(PRInt32 ordinal, nsString& result) static const char gLowerRomanCharsA[] = "ixcm"; static const char gUpperRomanCharsA[] = "IXCM"; -static const char gLowerRomanCharsB[] = "vld?"; -static const char gUpperRomanCharsB[] = "VLD?"; +static const char gLowerRomanCharsB[] = "vld"; +static const char gUpperRomanCharsB[] = "VLD"; static PRBool RomanToText(PRInt32 ordinal, nsString& result, const char* achars, const char* bchars) { - if (ordinal < 1) { + if (ordinal < 1 || ordinal > 3999) { DecimalToText(ordinal, result); return PR_FALSE; } diff --git a/layout/html/base/src/nsBulletFrame.cpp b/layout/html/base/src/nsBulletFrame.cpp index 441299a4a6f..bba7d083f84 100644 --- a/layout/html/base/src/nsBulletFrame.cpp +++ b/layout/html/base/src/nsBulletFrame.cpp @@ -481,12 +481,12 @@ static PRBool TamilToText(PRInt32 ordinal, nsString& result) static const char gLowerRomanCharsA[] = "ixcm"; static const char gUpperRomanCharsA[] = "IXCM"; -static const char gLowerRomanCharsB[] = "vld?"; -static const char gUpperRomanCharsB[] = "VLD?"; +static const char gLowerRomanCharsB[] = "vld"; +static const char gUpperRomanCharsB[] = "VLD"; static PRBool RomanToText(PRInt32 ordinal, nsString& result, const char* achars, const char* bchars) { - if (ordinal < 1) { + if (ordinal < 1 || ordinal > 3999) { DecimalToText(ordinal, result); return PR_FALSE; }