aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/debug_format.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-26 01:55:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-01-26 01:55:43 +0000
commit0a91b11d286446fe7849a6f537b4a21a52f63399 (patch)
tree6ec3636787883bf1b20bd490cc011110b625d3fe /libc/bionic/debug_format.cpp
parent6a94cb748bf63278c3271b0ab610061b0dc6f04a (diff)
parent239e7a0756fddf3698bf72cab10d7f382421090b (diff)
downloadandroid_bionic-0a91b11d286446fe7849a6f537b4a21a52f63399.tar.gz
android_bionic-0a91b11d286446fe7849a6f537b4a21a52f63399.tar.bz2
android_bionic-0a91b11d286446fe7849a6f537b4a21a52f63399.zip
Merge "More debug malloc fixes."
Diffstat (limited to 'libc/bionic/debug_format.cpp')
-rw-r--r--libc/bionic/debug_format.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/bionic/debug_format.cpp b/libc/bionic/debug_format.cpp
index e8d6a45cd..eeed3ac0d 100644
--- a/libc/bionic/debug_format.cpp
+++ b/libc/bionic/debug_format.cpp
@@ -460,6 +460,9 @@ out_vformat(Out *o, const char *format, va_list args)
if (c == 's') {
/* string */
str = va_arg(args, const char*);
+ if (str == NULL) {
+ str = "(null)";
+ }
} else if (c == 'c') {
/* character */
/* NOTE: char is promoted to int when passed through the stack */