diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-09 23:22:44 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-09 23:22:44 +0000 |
commit | d6e9b88468e0bdc8f46ceaba1d97ba00253fc941 (patch) | |
tree | bcce965f82c73d86477292205b4f334ea0669746 /platform_tools | |
parent | e4a4f12bb5f15726107402be0506d382638f0bf2 (diff) |
remove sprintf
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/230413005
git-svn-id: http://skia.googlecode.com/svn/trunk@14123 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools')
-rw-r--r-- | platform_tools/android/launcher/skia_launcher.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform_tools/android/launcher/skia_launcher.cpp b/platform_tools/android/launcher/skia_launcher.cpp index 746d470a3c..d1bdcb5428 100644 --- a/platform_tools/android/launcher/skia_launcher.cpp +++ b/platform_tools/android/launcher/skia_launcher.cpp @@ -8,6 +8,10 @@ #include <dlfcn.h> #include <stdio.h> +#ifdef SK_BUILD_FOR_WIN + #define snprintf _snprintf +#endif + void usage() { printf("[USAGE] skia_launcher program_name [options]\n"); printf(" program_name: the skia program you want to launch (e.g. tests, bench)\n"); @@ -32,7 +36,8 @@ void* load_library(const char* appLocation, const char* libraryName) { // attempt to lookup the location of the shared libraries char libraryLocation[100]; - sprintf(libraryLocation, "%s/lib%s.so", appLocation, libraryName); + snprintf(libraryLocation, SK_ARRAY_COUNT(libraryLocation), + "%s/lib%s.so", appLocation, libraryName); if (!file_exists(libraryLocation)) { printf("ERROR: Unable to find the '%s' library in the Skia App.\n", libraryName); printf("ERROR: Did you provide the correct program_name?\n"); |