Fix possible serious error which could result in overrunning the caller's buffer
parent
849dcf6c29
commit
1e0303b1a3
|
@ -163,7 +163,7 @@ mpc_bool_t CanSeekProc(void *data)
|
||||||
framesToRead = frames;
|
framesToRead = frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
[self writeToBuffer:((float*)(buf + (framesRead*bytesPerFrame))) fromBuffer:sampleBuffer frames: bufferFrames];
|
[self writeToBuffer:((float*)(buf + (framesRead*bytesPerFrame))) fromBuffer:sampleBuffer frames: framesToRead];
|
||||||
|
|
||||||
frames -= framesToRead;
|
frames -= framesToRead;
|
||||||
framesRead += framesToRead;
|
framesRead += framesToRead;
|
||||||
|
|
Loading…
Reference in New Issue