am e3615230: am 8c526578: am 4a5966b9: Merge "Change sprintf to snprintf calls."

* commit 'e36152308da6b1e67b05ad790081bc7e4424ae4e':
  Change sprintf to snprintf calls.
This commit is contained in:
Christopher Ferris 2014-04-25 22:38:10 +00:00 committed by Android Git Automerger
commit 8f36be3cdb
1 changed files with 2 additions and 2 deletions

View File

@ -108,11 +108,11 @@ bool BacktraceMap::Build() {
#if defined(__APPLE__)
// cmd is guaranteed to always be big enough to hold this string.
sprintf(cmd, "vmmap -w -resident -submap -allSplitLibs -interleaved %d", pid_);
snprintf(cmd, sizeof(cmd), "vmmap -w -resident -submap -allSplitLibs -interleaved %d", pid_);
FILE* fp = popen(cmd, "r");
#else
// path is guaranteed to always be big enough to hold this string.
sprintf(path, "/proc/%d/maps", pid_);
snprintf(path, sizeof(path), "/proc/%d/maps", pid_);
FILE* fp = fopen(path, "r");
#endif
if (fp == NULL) {