From fae12d4fb45e2c4e8943811d784db04599c7e202 Mon Sep 17 00:00:00 2001 From: Michael Lentine Date: Fri, 31 Oct 2014 11:08:19 -0700 Subject: [PATCH] Fix output of pointers for 64bit devices. Change-Id: I279c1cf8d4c126b98f4a92ca807ade3749d01ff0 --- libs/binder/TextOutput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/binder/TextOutput.cpp b/libs/binder/TextOutput.cpp index db3e858a4..2ed51887b 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; }