From 6c761698e8866360a09784c26b7784fbae30a191 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 25 Oct 2014 14:57:10 +0100 Subject: coverity#1249458 Explicit null dereferenced Change-Id: I9e56aa8908ae6747d6820d8b90e85ec07e981223 --- sax/source/tools/fastserializer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sax') diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 9209bd803c39..394af442ff21 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -126,7 +126,7 @@ namespace sax_fastparser { void FastSaxSerializer::write( const char* pStr, sal_Int32 nLen, bool bEscape ) { if (nLen == -1) - nLen = strlen(pStr); + nLen = pStr ? strlen(pStr) : 0; if (!bEscape) { -- cgit