From 59565080becb95f4d47971d09ce126a5193d076e Mon Sep 17 00:00:00 2001 From: "caillon%returnzero.com" Date: Sat, 17 May 2003 13:57:16 +0000 Subject: [PATCH] 205225 - document.createTreeWalker(null, ...) wasn't null checking. r=sicking sr=jst a=asa --- content/base/src/nsDocument.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 4379e9382b29..a29621fd27ff 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -2772,6 +2772,10 @@ nsDocument::CreateTreeWalker(nsIDOMNode *aRoot, { *_retval = nsnull; + if (!aRoot) { + return NS_ERROR_DOM_NOT_SUPPORTED_ERR; + } + nsresult rv = nsContentUtils::CheckSameOrigin(this, aRoot); if (NS_FAILED(rv)) { return rv;