Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp

Issue 1571233003: Fix errors caused by unsafe conversions to/from size_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved ALLOW_NUMERIC_ARG_TYPES_PROMOTABLE_TO Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
diff --git a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
index 8a47d479fbbcd941ebef04f8af0d3d77d412708a..8916e833fc0ae8fe9eee904978d94d74e748e36b 100644
--- a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
+++ b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
@@ -202,7 +202,7 @@ void MHTMLArchive::generateMHTMLPart(
if (!strcmp(contentEncoding, quotedPrintable)) {
quotedPrintableEncode(data, dataLength, encodedData);
outputBuffer.append(encodedData.data(), encodedData.size());
- outputBuffer.append("\r\n", 2);
+ outputBuffer.append("\r\n", 2u);
} else {
ASSERT(!strcmp(contentEncoding, base64));
// We are not specifying insertLFs = true below as it would cut the lines with LFs and MHTML requires CRLFs.
@@ -213,7 +213,7 @@ void MHTMLArchive::generateMHTMLPart(
do {
size_t lineLength = std::min(encodedDataLength - index, maximumLineLength);
outputBuffer.append(encodedData.data() + index, lineLength);
- outputBuffer.append("\r\n", 2);
+ outputBuffer.append("\r\n", 2u);
index += maximumLineLength;
} while (index < encodedDataLength);
}

Powered by Google App Engine
This is Rietveld 408576698