From e45973308381de0d033bddc2e2e788b1a3545082 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Wed, 18 Feb 2004 00:15:49 +0000 Subject: [PATCH] Arguments to strcmp need to be null-terminated. b=228688 r+sr=jst a=chofmann --- htmlparser/src/nsHTMLTags.cpp | 4 ++-- parser/htmlparser/src/nsHTMLTags.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htmlparser/src/nsHTMLTags.cpp b/htmlparser/src/nsHTMLTags.cpp index 710de4f52cf..f0a4293e595 100644 --- a/htmlparser/src/nsHTMLTags.cpp +++ b/htmlparser/src/nsHTMLTags.cpp @@ -446,11 +446,11 @@ nsHTMLTags::LookupTag(const nsAString& aTagName) if (tag == eHTMLTag_unknown) { // "__moz_text" static const PRUnichar moz_text[] = - {'_', '_', 'm', 'o', 'z', '_', 't', 'e', 'x', 't'}; + {'_', '_', 'm', 'o', 'z', '_', 't', 'e', 'x', 't', PRUnichar(0) }; // "#text" static const PRUnichar text[] = - {'#', 't', 'e', 'x', 't'}; + {'#', 't', 'e', 'x', 't', PRUnichar(0) }; if (nsCRT::strcmp(buf, moz_text) == 0) { tag = eHTMLTag_text; diff --git a/parser/htmlparser/src/nsHTMLTags.cpp b/parser/htmlparser/src/nsHTMLTags.cpp index 710de4f52cf..f0a4293e595 100644 --- a/parser/htmlparser/src/nsHTMLTags.cpp +++ b/parser/htmlparser/src/nsHTMLTags.cpp @@ -446,11 +446,11 @@ nsHTMLTags::LookupTag(const nsAString& aTagName) if (tag == eHTMLTag_unknown) { // "__moz_text" static const PRUnichar moz_text[] = - {'_', '_', 'm', 'o', 'z', '_', 't', 'e', 'x', 't'}; + {'_', '_', 'm', 'o', 'z', '_', 't', 'e', 'x', 't', PRUnichar(0) }; // "#text" static const PRUnichar text[] = - {'#', 't', 'e', 'x', 't'}; + {'#', 't', 'e', 'x', 't', PRUnichar(0) }; if (nsCRT::strcmp(buf, moz_text) == 0) { tag = eHTMLTag_text;