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

Unified Diff: src/images/SkKTXImageEncoder.cpp

Issue 1882593002: Make is_ktx safer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | third_party/ktx/ktx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkKTXImageEncoder.cpp
diff --git a/src/images/SkKTXImageEncoder.cpp b/src/images/SkKTXImageEncoder.cpp
index 5dc347ad66ff6c5c8bc406ead18d5b89e597447d..4b318a240c4ce6a764670d5736dfcdd7a631b35a 100644
--- a/src/images/SkKTXImageEncoder.cpp
+++ b/src/images/SkKTXImageEncoder.cpp
@@ -56,7 +56,7 @@ bool SkKTXImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int)
}
// Is it a KTX file??
- if (SkKTXFile::is_ktx(bytes)) {
+ if (SkKTXFile::is_ktx(bytes, data->size())) {
return stream->write(bytes, data->size());
}
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | third_party/ktx/ktx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698