1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00
serenity/Userland/Libraries
Daniel Bertalan e9f0ebd4bd LibHTTP: Fix logic error leading to buffer over-read
When we receive HTTP payloads, we have to ensure that the number of
bytes read is *at most* the value specified in the Content-Length
header.

However, we did not use the correct value when calculating the truncated
size of the last payload. `m_buffered_size` does not store the total
number of bytes received, but rather the number of bytes that haven't
been read from us.

This means that if some data has already been read from us,
`m_buffered_size` is smaller than `m_received_size`. Because of this, we
ended up resizing the `payload` ByteBuffer to a larger size than its
contents. This garbage data was then read by consumers, producing this
warning when executing scripts:

> Extension byte 0xdc in 1 position after first byte 0xdc doesn't make
> sense.
2021-10-30 00:54:34 +03:30
..
LibArchive Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibAudio Audio: Add per-client volume 2021-09-12 23:38:57 +02:00
LibC LibC+LibELF: Move getauxval and AT_* flags to sys/auxv.h 2021-10-28 11:24:36 +02:00
LibCards LibGfx: Use "try_" prefix for static factory functions 2021-07-21 18:02:15 +02:00
LibChess LibChess: Fix hashing of the chess board 2021-07-30 20:49:18 +02:00
LibCompress LibCompress: Add missing header to DeflateTables.h 2021-10-06 23:52:40 +01:00
LibConfig ConfigServer+LibConfig: Add way for clients to listen for config changes 2021-08-26 23:41:38 +02:00
LibCore LibCore: Add ElapsedTimer::reset() 2021-10-28 11:21:18 +02:00
LibCoredump LibCoredump: Show frames from Loader.so if the crash occurs in it 2021-10-17 17:09:58 +01:00
LibCpp LibCpp: Remove redundant comparison to Token::Type::PipePipe 2021-09-28 10:58:09 +02:00
LibCrypt Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibCrypto AK+Everywhere: Make Base64 decoding fallible 2021-10-23 19:16:40 +01:00
LibDebug LibDebug: Enable parsing libgcc_s.so 2021-10-17 17:09:58 +01:00
LibDesktop Userland: Use Core::Process::spawn() instead of posix_spawn() in places 2021-08-06 01:06:42 +02:00
LibDeviceTree Libraries: Add LibDeviceTree for manipulating OpenFirmware Device Trees 2021-10-21 19:20:03 -07:00
LibDiff LibDiff: Coalesce adjacent changes into the same Hunk 2021-09-24 14:32:52 +02:00
LibDl Toolchain+Userland: Enable TLS for x86_64 2021-07-04 01:07:28 +02:00
LibDSP LibDSP: Remove unused Effects::Delay::m_old_delay_size member 2021-09-28 10:58:09 +02:00
LibELF LibC+LibELF: Move getauxval and AT_* flags to sys/auxv.h 2021-10-28 11:24:36 +02:00
LibFileSystemAccessClient LibFileSystemAccessClient: Convert request paths to absolute if needed 2021-09-10 20:46:50 +04:30
LibGemini LibHTTP+LibGemini: Set underlying sockets as idle when detaching 2021-10-04 15:31:26 +02:00
LibGfx LibGfx: Add to_string() functions for MetricRole and PathRole 2021-10-28 11:23:44 +02:00
LibGL LibGL: Implement glIsEnabled() 2021-10-17 21:01:52 -07:00
LibGUI LibGUI: Add MetricRole and PathRole to GUI::Variant 2021-10-28 11:23:44 +02:00
LibHTTP LibHTTP: Fix logic error leading to buffer over-read 2021-10-30 00:54:34 +03:30
LibImageDecoderClient Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibIMAP LibIMAP: Remove unused Variant option 2021-09-21 04:22:52 +04:30
LibIPC LibIPC: Use a zero-delay timer for message processing 2021-10-24 01:01:01 +02:00
LibJS LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
LibKeyboard AK: Make Utf8View constructors inline and remove C string constructor 2021-09-18 19:54:24 +02:00
LibLine Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LibM Libraries: Fix typos 2021-10-01 01:06:40 +01:00
LibMarkdown LibMarkdown: Implement introspection of the document tree 2021-10-10 15:18:55 -07:00
LibPCIDB Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
LibPDF LibPDF: Rely on default-constructor of Variant 2021-09-21 04:22:52 +04:30
LibProtocol RequestServer+LibProtocol: Add an 'EnsureConnection' IPC endpoint 2021-09-28 22:32:31 +02:00
LibPthread LibPthread: Correct nonsensical loop exit condition in RWLock unlock 2021-09-28 12:34:51 +03:30
LibRegex LibRegex: Don't ignore empty alternatives in append_alternation() 2021-10-29 15:57:59 +02:00
LibSanitizer LibSanitizer+AK: Add float cast overflow handler 2021-08-08 10:55:36 +02:00
LibSQL LibSQL: Add better error handling to evaluate and execute methods 2021-10-25 12:59:42 +02:00
LibSymbolication LibSymbolication: Skip source position calculation if requested 2021-10-17 22:07:10 -07:00
LibSyntax LibWeb: Implement first draft of CSS syntax highlighting :^) 2021-10-23 19:07:44 +02:00
LibSystem Kernel+LibSystem: Add a 4th syscall argument 2021-07-25 14:08:50 +02:00
LibTest LibJS: Convert JSONObject functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
LibTextCodec LibTextCodec: Ignore BYTE ORDER MARK at the start of utf8/16 strings 2021-09-15 17:00:18 +02:00
LibThreading LibThreading: Add missing headers to Mutex.h 2021-10-06 23:52:40 +01:00
LibTLS LibTLS: Remove useless ByteBuffer allocation in TLSv12::read_line() 2021-10-10 00:27:44 +02:00
LibUnicode LibUnicode: Generate standalone compile-time array for combining class 2021-10-10 13:49:37 +02:00
LibUSBDB LibUSBDB: Fix vendor id decoding 2021-06-18 19:41:25 +04:30
LibVideo Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibVT Everywhere: Rename left/right-click to primary/secondary 2021-10-27 22:05:58 +03:00
LibWasm LibWasm: Add missing forward declaration to Printer/Printer.h 2021-10-06 23:52:40 +01:00
LibWeb LibWeb: Render any specified list-style-image for list items 2021-10-29 22:06:49 +02:00
LibWebSocket LibWebSocket: Add missing headers to Message.h 2021-10-06 23:52:40 +01:00
LibX86 LibX86: Take load base address into consideration during disassembly 2021-10-25 12:14:26 +02:00
CMakeLists.txt Libraries: Add LibDeviceTree for manipulating OpenFirmware Device Trees 2021-10-21 19:20:03 -07:00