mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Cap a report at 32 KB on both sides of the upload
The client would send up to 256 KB and the sink answered a settling 400 above 64 KB, so the two disagreed about what a valid report is, and the client deletes what it is told is invalid. Unreachable in practice — the module table and backtrace are both bounded, which puts the ceiling near 10 KB — but the two constants have to agree for the disagreement not to matter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 5
parent
1d0b4beb4c
commit
c3e2d1ae3d
@@ -37,8 +37,10 @@ void writeConsent(bool yes) {
|
||||
CloseHandle(h);
|
||||
}
|
||||
|
||||
// A report bigger than this is not one of ours; never put it on the wire.
|
||||
const DWORD kMaxReportBytes = 256 * 1024;
|
||||
// A report bigger than this is not one of ours; never put it on the wire. Kept
|
||||
// equal to MAX_BYTES in the sink, which answers a settling 400 above it: sending
|
||||
// what the sink will not take is how an upload destroys the report it carries.
|
||||
const DWORD kMaxReportBytes = 32 * 1024;
|
||||
|
||||
// POST one report file to url. Returns the HTTP status, or 0 if the request never
|
||||
// completed (no connection, DNS failure, timeout) — see reportIsSettled().
|
||||
|
||||
Reference in New Issue
Block a user