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

Unified Diff: include/utils/SkDebugUtils.h

Issue 943453002: Avoid wrong memory access due to double substitution and %% (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkDebugUtils.h
diff --git a/include/utils/SkDebugUtils.h b/include/utils/SkDebugUtils.h
index 2fa6d413139939c366767ac885d2e53238cb916e..fe276019ba1e5053bf571e36f5514fd91eca77a7 100644
--- a/include/utils/SkDebugUtils.h
+++ b/include/utils/SkDebugUtils.h
@@ -23,7 +23,7 @@ inline void SkDebugDumpMathematica( const T val ) {
template<class T>
inline void SkDebugDumpMathematica(const char *name, const T *array, int size) {
- SkDebugf(name);
+ SkDebugf("%s", name);
SkDebugf(" = {");
for (int i=0 ; i < size ; i++) {
SkDebugDumpMathematica<T>(array[i]);
@@ -34,7 +34,7 @@ inline void SkDebugDumpMathematica(const char *name, const T *array, int size) {
template<class T>
inline void SkDebugDumpMathematica(const char *name, const T *array, int width, int height) {
- SkDebugf(name);
+ SkDebugf("%s", name);
SkDebugf(" = {\n");
for (int i=0 ; i < height ; i++) {
SkDebugf(" {");
@@ -54,7 +54,7 @@ inline void SkDebugDumpMathematica(const char *name, const T *array, int width,
template<class T>
inline void SkDebugDumpMathematica( const char *name, const T val ) {
- SkDebugf(name);
+ SkDebugf("%s", name);
SkDebugf(" = ");
SkDebugDumpMathematica<T>(val);
SkDebugf(";\n");
« no previous file with comments | « no previous file | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698