summaryrefslogtreecommitdiff
path: root/xpcom/io/nsLinebreakConverter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/io/nsLinebreakConverter.cpp')
-rw-r--r--xpcom/io/nsLinebreakConverter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xpcom/io/nsLinebreakConverter.cpp b/xpcom/io/nsLinebreakConverter.cpp
index 62bcb54e23..a7c99d3f16 100644
--- a/xpcom/io/nsLinebreakConverter.cpp
+++ b/xpcom/io/nsLinebreakConverter.cpp
@@ -217,7 +217,7 @@ ConvertUnknownBreaks(const T* aInSrc, int32_t& aIoLen, const char* aDestBreak)
while (src < srcEnd) {
if (*src == nsCRT::CR) {
- if (src < srcEnd && src[1] == nsCRT::LF) {
+ if (src + 1< srcEnd && src[1] == nsCRT::LF) {
// CRLF
finalLen += destBreakLen;
src++;
@@ -246,7 +246,7 @@ ConvertUnknownBreaks(const T* aInSrc, int32_t& aIoLen, const char* aDestBreak)
while (src < srcEnd) {
if (*src == nsCRT::CR) {
- if (src < srcEnd && src[1] == nsCRT::LF) {
+ if (src + 1 < srcEnd && src[1] == nsCRT::LF) {
// CRLF
AppendLinebreak(dst, aDestBreak);
src++;