History log of /system/core/liblog/logprint.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9227bd385504ace739d4451a6c5dc3d777b5bf21 24-Jul-2013 Colin Cross <ccross@android.com> Move liblog headers to system/core/include/log

Move the liblog headers to log/ instead of cutils/ to complete
the separation of libcutils and liblog. cutils/log.h still
exists and includes log/log.h in order to support the many existing
modules that use cutils/log.h.

Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
/system/core/liblog/logprint.c
d2c8f52189f8c2a13b88a107c6495f9d83196d2d 28-Feb-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed two 64-bit porting issues; Make pid/tid type consistent

1. In printf, use "%zu" for variable of type size_t
2. Print tid in %5d
3. Make type of pid/tid in AndroidLogEntry and logger_entry consistent

Change-Id: I3e3d9536ee58823f349a4734ae093d30eabe1bfe
/system/core/liblog/logprint.c
a820a0e587b1f6be7283588b744cd33ba5723bdf 27-Oct-2011 Jeff Sharkey <jsharkey@android.com> Gracefully handle truncated log messages.

Bug: 5522726
Change-Id: I8637c7da854ec1ecb321632c45ee9bc2edc94a67
/system/core/liblog/logprint.c
e1ede1530ff21d3b8920c0cbbebb42ccff4fa22d 19-Oct-2011 Nick Kralevich <nnk@google.com> liblog: do better checks of log messages.

Testing:

The following test cases all passed and generated log entries:

# echo -n '\03foo\0bar\0' > /dev/log/main
# echo -n '\03\0bar\0' > /dev/log/main
# echo -n '\03\0a\0' > /dev/log/main

The following entries were successfully processed by
logcat but produced no log entries:

# echo -n '\03\0\0' > /dev/log/main
# echo -n '\03a\0\0' > /dev/log/main
# echo -n '\03b\0\0' > /dev/log/main

Also tested the pathological error condition:

cat /dev/urandom > /dev/log/main

which produced many "+++ LOG: malformed log entry" errors.

Bug: 5478600
Change-Id: I53bc79507242dcfc14445746c29edf47be0a90b4
/system/core/liblog/logprint.c
63f4a84104c228c74cdf132f5cef4f5184ae04bb 17-Oct-2011 Nick Kralevich <nnk@google.com> liblog: ensure that the message length is consistent

When parsing log entries which may have embedded \0s, it's
possible for entry->messageLen to not be the actual
length of the string in entry->message. Detect this condition.

Bug: 5417417
Change-Id: I712cac7696af7831e24765b5a1b345d6ff5fb407
/system/core/liblog/logprint.c
4bf3c02e026077d14a4512c7c2f71937da3c2d50 01-Oct-2011 Kenny Root <kroot@google.com> Add checking for log entry format

The log tag may be zero length if corrupted, so check for this
condition.

Change-Id: I7616226dabe78a85859b0ab53aca08f734dbdd84
/system/core/liblog/logprint.c
7df6349a63b89d279131ec7dd7e6ef1b065854f5 09-Mar-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I698b3c16bdef8751cc857b00f815cb2f95465431
e2bf2ea4d2846031edfc52b942ad53e5467243f6 01-Mar-2010 Joe Onorato <joeo@android.com> Make logcat print both the main and system buffers by default. Make SLOGx macros work.
/system/core/liblog/logprint.c
b45b5c9f227473050ef785d11e518e947c8754fb 11-Feb-2010 Keith Preston <keithpre@gmail.com> Fix Heap Corruption from too long of a TAG

snprintf has a weird return value. It returns what would have been written given a large enough buffer.
In the case that the prefix is longer then our buffer(128), it messes up the calculations below possibly causing heap corruption.
To avoid this we double check and set the length at the maximum (size minus null byte
/system/core/liblog/logprint.c
abb9638e3696e393d6dc45439feda91073e52103 04-Nov-2008 Alexey Tarasov <tarasov@dodologics.com> 1. added macro definitions to AndroidConfig.h
2. removed unnecessary include of <alloca.h>
/system/core/liblog/logprint.c
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/core/liblog/logprint.c