Chromium Code Reviews| Index: src/client/mac/handler/minidump_generator.cc |
| diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc |
| index 7d6e81dbb86439110b3106fffe9f31b7f2c70350..7a2b999c8382a55cf1aa63979d8004e59dc1195c 100644 |
| --- a/src/client/mac/handler/minidump_generator.cc |
| +++ b/src/client/mac/handler/minidump_generator.cc |
| @@ -142,11 +142,14 @@ void MinidumpGenerator::GatherSystemInformation() { |
| CFRelease(read_stream); |
| return; |
| } |
| + // Actual data file tests: Mac at 480 bytes and iOS at 413 bytes, |
| + // so setting max length comfortably higher. |
| + const CFIndex kMaxBufferLength = 2048; |
| + UInt8 data_bytes[kMaxBufferLength]; |
| + CFIndex num_bytes_read = |
| + CFReadStreamRead(read_stream, data_bytes, kMaxBufferLength); |
| CFDataRef data = NULL; |
| - CFIndex num_bytes_read = 0; |
| - const UInt8 *data_bytes = |
| - CFReadStreamGetBuffer(read_stream, 0, &num_bytes_read); |
| - if (data_bytes) { |
| + if (num_bytes_read > 0) { |
|
Mark Mentovai
2016/01/26 14:08:50
If num_bytes_read == kMaxBufferLength, there may h
ivanpe
2016/01/27 18:35:42
Mark, Scott addressed your comment. Can you pleas
|
| data = CFDataCreate(NULL, data_bytes, num_bytes_read); |
| } |
| CFReadStreamClose(read_stream); |