1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 05:35:07 +00:00
serenity/Kernel/Devices/Audio
kleines Filmröllchen f6af357763 Kernel/Audio: Fix buffer size underflow for non-page-aligned sizes
When the size of the audio data was not a multiple of a page size,
subtracting the page size from this unsigned variable would underflow it
close to 2^32 and be clamped to the page size again. This would lead to
writes into garbage addresses because of an incorrect write size,
interestingly only causing the write() call to error out.

Using saturating math neatly fixes this problem and allows buffer
lengths that are not a multiple of a page size.
2022-06-23 23:26:33 +01:00
..
AC97.cpp Kernel/Audio: Fix buffer size underflow for non-page-aligned sizes 2022-06-23 23:26:33 +01:00
AC97.h Kernel: Don't VERIFY that the DMA channel is running on AC'97 interrupt 2022-06-15 20:53:10 +03:00
Channel.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Channel.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Controller.h Kernel/Audio: Introduce a new design architecture for the subsystem 2022-02-14 11:39:19 +01:00
Management.cpp Kernel/PCI: Don't hold spinlocks when doing fast device enumeration 2022-03-14 22:39:09 +01:00
Management.h Kernel/Audio: Introduce a new design architecture for the subsystem 2022-02-14 11:39:19 +01:00