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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 2 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/image-decoders/ico/ICOImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
index 2cb6eab842728f80179b5f961618b6ded839053e..10ccb5d41d21128766e0e79a222a79d358d1ad17 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
@@ -189,7 +189,7 @@ bool ICOImageDecoder::decodeDirectory() {
}
bool ICOImageDecoder::decodeAtIndex(size_t index) {
- ASSERT_WITH_SECURITY_IMPLICATION(index < m_dirEntries.size());
+ SECURITY_DCHECK(index < m_dirEntries.size());
const IconDirectoryEntry& dirEntry = m_dirEntries[index];
const ImageType imageType = imageTypeAtIndex(index);
if (imageType == Unknown)
@@ -330,7 +330,7 @@ ICOImageDecoder::IconDirectoryEntry ICOImageDecoder::readDirectoryEntry() {
ICOImageDecoder::ImageType ICOImageDecoder::imageTypeAtIndex(size_t index) {
// Check if this entry is a BMP or a PNG; we need 4 bytes to check the magic
// number.
- ASSERT_WITH_SECURITY_IMPLICATION(index < m_dirEntries.size());
+ SECURITY_DCHECK(index < m_dirEntries.size());
const uint32_t imageOffset = m_dirEntries[index].m_imageOffset;
if ((imageOffset > m_data->size()) || ((m_data->size() - imageOffset) < 4))
return Unknown;

Powered by Google App Engine
This is Rietveld 408576698