summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/impex.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index f64cf4b0e5e8..3a798b37e50e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2516,8 +2516,17 @@ Label_RetryWithNewSep:
while (!rStream.eof() && aStr.getLength() < nArbitraryLineLengthLimit)
{
const sal_Unicode * p = aStr.getStr() + nLastOffset;
- while (*p)
+ const sal_Unicode * const pStop = aStr.getStr() + aStr.getLength();
+ while (p < pStop)
{
+ if (!*p)
+ {
+ // Skip embedded null-characters. They don't change
+ // anything and are handled at a higher level.
+ ++p;
+ continue;
+ }
+
if (nQuotes)
{
if (*p == cFieldQuote)