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

Unified Diff: src/core/SkError.cpp

Issue 2391133005: remove sprintf (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | src/core/SkRegion.cpp » ('j') | tests/PathOpsOpCircleThreadedTest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkError.cpp
diff --git a/src/core/SkError.cpp b/src/core/SkError.cpp
index d85b5ff0cc08d47daff2793122a540938f60288d..96bda7ebf473da48202dbce83c26daed07dff957 100644
--- a/src/core/SkError.cpp
+++ b/src/core/SkError.cpp
@@ -116,7 +116,7 @@ void SkErrorInternals::SetError(SkError code, const char *fmt, ...) {
break;
}
- sprintf( str, "%s: ", error_name );
+ snprintf( str, ERROR_STRING_LENGTH, "%s: ", error_name );
int string_left = SkToInt(ERROR_STRING_LENGTH - strlen(str));
str += strlen(str);
« no previous file with comments | « no previous file | src/core/SkRegion.cpp » ('j') | tests/PathOpsOpCircleThreadedTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698