mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
os: clear remaining samples in Audio packet
... instead of potentially producing out-of-bounds write in the source buffer. Fixes #3264.
This commit is contained in:
parent
5ceba11982
commit
3362216b66
@ -94,7 +94,7 @@ class Audio_out::Packet
|
||||
Genode::memcpy(_data, data, (samples > PERIOD ? PERIOD : samples) * SAMPLE_SIZE);
|
||||
|
||||
if (samples < PERIOD)
|
||||
Genode::memset(data + samples, 0, (PERIOD - samples) * SAMPLE_SIZE);
|
||||
Genode::memset(_data + samples, 0, (PERIOD - samples) * SAMPLE_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user