[Libreoffice-commits] core.git: sax/source

Michael Meeks michael.meeks at collabora.com
Tue Nov 26 08:34:09 PST 2013


 sax/source/fastparser/fastparser.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8db8ea918faf1e1ea100de20d156725d9d51fc9
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Nov 26 17:39:26 2013 +0000

    fastparser: strncmp needs a length.

diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index a6bbfbb..afe9454 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -950,7 +950,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char
             assert(awAttributes[i+1]);
 
             if( awAttributes[i][0] != 'x' ||
-                strcmp( awAttributes[i], "xmlns") != 0 )
+                strncmp( awAttributes[i], "xmlns", 5) != 0 )
                 continue;
 
             splitName( awAttributes[i], pPrefix, nPrefixLen, pName, nNameLen );


More information about the Libreoffice-commits mailing list