breakpad/src/common
benchan@chromium.org ae5193c24e Replace readlink calls with a safer version that guarantees NULL-termination.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Add a SafeReadLink function that wraps sys_readlink() to resolve a
   symbolic link but guarantees the result is NULL-terminated on success.
2. Refactor other source code to use SafeReadLink instead of readlink()
   or sys_readlink().

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/334001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@896 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-21 17:51:40 +00:00
..
dwarf Add includes for unittests that appear to need them. 2011-10-17 19:08:31 +00:00
linux Replace readlink calls with a safer version that guarantees NULL-termination. 2011-12-21 17:51:40 +00:00
mac Correct compilation warning. 2011-11-23 14:22:05 +00:00
solaris Breakpad: Update copyright notice years on all files changed in 2010. 2010-02-09 17:08:56 +00:00
testdata Breakpad Linux dumper: Make StabsReader independent of endianness and word size. 2010-05-05 17:09:20 +00:00
tests Correct compilation warning. 2011-11-23 14:22:05 +00:00
windows Fixed message about unregistered msdia*dll. Builds with different DiaSDK need different dll. 2011-04-26 20:52:48 +00:00
basictypes.h Refactor code in preparation of merging with the fork in Chromium OS. 2011-12-16 16:42:59 +00:00
byte_cursor.h Breakpad symbol dumper: Define the ByteBuffer and ByteCursor classes. 2010-05-05 17:07:23 +00:00
byte_cursor_unittest.cc Breakpad symbol dumper: Define the ByteBuffer and ByteCursor classes. 2010-05-05 17:07:23 +00:00
convert_UTF.c Add unicode.org UTF-8/16/32 conversion code. 2006-12-15 00:03:27 +00:00
convert_UTF.h Add unicode.org UTF-8/16/32 conversion code. 2006-12-15 00:03:27 +00:00
dwarf_cfi_to_module.cc Fix harmless warning in dwarf_cfi_to_module.cc. 2011-10-11 17:38:35 +00:00
dwarf_cfi_to_module.h Breakpad Linux/Mac symbol dumper: Share duplicate strings that arise in DWARF data. 2010-07-17 15:14:30 +00:00
dwarf_cfi_to_module_unittest.cc Add includes for unittests that appear to need them. 2011-10-17 19:08:31 +00:00
dwarf_cu_to_module.cc Add some unit tests for Linux WriteSymbolFile 2011-07-06 17:05:59 +00:00
dwarf_cu_to_module.h Fix some comments and parameter names. 2011-11-23 23:03:30 +00:00
dwarf_cu_to_module_unittest.cc Fix some comments and parameter names. 2011-11-23 23:03:30 +00:00
dwarf_line_to_module.cc Remove "using namespace std" from dwarf2reader.h. Using-directives are 2011-10-11 17:59:03 +00:00
dwarf_line_to_module.h Breakpad symbol dumper: Move Linux dumping classes into src/common. 2010-04-05 19:40:17 +00:00
dwarf_line_to_module_unittest.cc Add includes for unittests that appear to need them. 2011-10-17 19:08:31 +00:00
language.cc Upstream fix for compiling of breakpad with gcc-4.6. Remove an unnecessary 2011-10-22 16:57:10 +00:00
language.h Breakpad symbol dumper: Move Linux dumping classes into src/common. 2010-04-05 19:40:17 +00:00
md5.cc Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace. 2011-11-18 21:40:27 +00:00
md5.h Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace. 2011-11-18 21:40:27 +00:00
memory.h Write a window of memory around the instruction pointer from the crashing thread to the minidump on OS X. 2010-09-23 14:55:50 +00:00
memory_range.h Refactor code in preparation of merging with the fork in Chromium OS. 2011-12-16 16:42:59 +00:00
memory_range_unittest.cc Refactor code in preparation of merging with the fork in Chromium OS. 2011-12-16 16:42:59 +00:00
memory_unittest.cc Write a window of memory around the instruction pointer from the crashing thread to the minidump on OS X. 2010-09-23 14:55:50 +00:00
module.cc Linux/Mac: Add option to omit the CFI section in dump_syms. 2011-09-14 01:02:55 +00:00
module.h Linux/Mac: Add option to omit the CFI section in dump_syms. 2011-09-14 01:02:55 +00:00
module_unittest.cc Linux/Mac: Add option to omit the CFI section in dump_syms. 2011-09-14 01:02:55 +00:00
stabs_reader.cc Fix some shadow variables, including one in file_id.cc that causes all files to generate the same hash. Add a test to make sure this doesn't happen again. 2011-10-20 18:23:01 +00:00
stabs_reader.h Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
stabs_reader_unittest.cc Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
stabs_to_module.cc Add some unit tests for Linux WriteSymbolFile 2011-07-06 17:05:59 +00:00
stabs_to_module.h Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
stabs_to_module_unittest.cc Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
string_conversion.cc Clean up build for 64 bit. 2010-07-19 20:43:49 +00:00
string_conversion.h Solaris port of minidump generator. Port by Alfred Peng. r=me 2007-08-07 21:16:45 +00:00
test_assembler.cc review: http://breakpad.appspot.com/138001 2010-07-29 05:25:43 +00:00
test_assembler.h Breakpad Mac symbol dumper: Add new Mach-O reader class. 2010-06-25 16:56:16 +00:00
test_assembler_unittest.cc Clean up build for 64 bit. 2010-07-19 20:43:49 +00:00