History

oss: fix input buffer overrun [bug #300]

Each iteration of the write loop should only read the remaining number of samples, not the full input buffer size.

Mans Rullgard committed 8 years ago

Commit 342d3e71 parent 9923bcf1 file · +1 −1Browse files

Unified · Split

src/oss.c+1−1
@@ -369,7 +369,7 @@ static size_t osswrite( · 368 unmodified lines
369 size_t cbStride;369 size_t cbStride;
370 int cbWritten;370 int cbWritten;
371 371
372 cStride = cInput;372 cStride = cInputRemaining;
373 if (cStride > pPriv->cOutput) {373 if (cStride > pPriv->cOutput) {
374 cStride = pPriv->cOutput;374 cStride = pPriv->cOutput;
375 }375 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t