mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
CFStream’s CFReadStreamGetBuffer() calls the Read() callback without initializing at_eof. The callback function is responsible for setting it on any successful read operation. See 10.10.2 CF-1152.14/CFStream.c. By chance, at_eof seems to always have an initial value of false on x86_64, but true on 32-bit x86. Crashpad’s Read() callback assumed that the initial value was always false. The discrepancy caused truncation and possibly hangs when a 32-bit process attempted to upload a request body larger than 32kB, the buffer size used by NSMutableURLRequest or something between it and CFReadStream. A new test with more than 32kB of data is added. As discussed in: https://groups.google.com/a/chromium.org/d/topic/crashpad-dev/Vz--qMZJRPU TEST=crashpad_util_test HTTPTransport.Upload33k BUG= R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1304433004 .