summaryrefslogtreecommitdiffstats
path: root/libs/binder/TextOutput.cpp
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2014-10-31 11:08:19 -0700
committerMichael Lentine <mlentine@google.com>2014-10-31 11:08:19 -0700
commitfae12d4fb45e2c4e8943811d784db04599c7e202 (patch)
treed18281e6daad5faae1f25240a56c0e1d43dd5c4f /libs/binder/TextOutput.cpp
parent7b97351b68e96ea67380140266abb897fe1be57d (diff)
downloadframeworks_native-fae12d4fb45e2c4e8943811d784db04599c7e202.zip
frameworks_native-fae12d4fb45e2c4e8943811d784db04599c7e202.tar.gz
frameworks_native-fae12d4fb45e2c4e8943811d784db04599c7e202.tar.bz2
Fix output of pointers for 64bit devices.
Change-Id: I279c1cf8d4c126b98f4a92ca807ade3749d01ff0
Diffstat (limited to 'libs/binder/TextOutput.cpp')
-rw-r--r--libs/binder/TextOutput.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/TextOutput.cpp b/libs/binder/TextOutput.cpp
index db3e858..2ed5188 100644
--- a/libs/binder/TextOutput.cpp
+++ b/libs/binder/TextOutput.cpp
@@ -116,8 +116,8 @@ TextOutput& operator<<(TextOutput& to, double val)
TextOutput& operator<<(TextOutput& to, const void* val)
{
- char buf[16];
- sprintf(buf, "%p", val);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%p", val);
to.print(buf, strlen(buf));
return to;
}