[PATCH] Fix pacat memory issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2017-07-30 at 23:40 +0300, Denis Shulyaka wrote:
> If only part of the buffer is written into stdout by stdout_callback, the buffer_index variable is increased by the number of written bytes, buffer_length variable is decreased while the allocated buffer size remains the same. That suggests that the current allocated size is calculated as (buffer_index + buffer_length). However the current stream_read_callback implementation writes new data to the start of the buffer and allocates too little space, so that (buffer + buffer_index + buffer_length - 1) could actully point outside of the allocated buffer.

In the future, please wrap the commit message to some sensible line
length (I use 73 characters myself).

Otherwise looks good, I pushed this to master. Thanks!

-- 
Tanu

https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux