diff --git a/htmlparser/src/nsHTMLParser.cpp b/htmlparser/src/nsHTMLParser.cpp
index ba375429ef95..ea74be64222b 100644
--- a/htmlparser/src/nsHTMLParser.cpp
+++ b/htmlparser/src/nsHTMLParser.cpp
@@ -718,7 +718,7 @@ PRBool VerifyContextVector(CTokenizer * tokenizer, PRInt32 aTags[],PRInt32 count
}
// generate a filename to dump the html source into
- char filename[_MAX_PATH];
+ char filename[1024];
do {
// use system time to generate a temporary file name
time_t ltime;
diff --git a/parser/htmlparser/src/nsHTMLParser.cpp b/parser/htmlparser/src/nsHTMLParser.cpp
index ba375429ef95..ea74be64222b 100644
--- a/parser/htmlparser/src/nsHTMLParser.cpp
+++ b/parser/htmlparser/src/nsHTMLParser.cpp
@@ -718,7 +718,7 @@ PRBool VerifyContextVector(CTokenizer * tokenizer, PRInt32 aTags[],PRInt32 count
}
// generate a filename to dump the html source into
- char filename[_MAX_PATH];
+ char filename[1024];
do {
// use system time to generate a temporary file name
time_t ltime;