• Max Kellermann's avatar
    PcmBuffer: reset size in Clear() · 105b431e
    Max Kellermann authored
    Fix for Mantis #3806.
    
    "PcmBuffer::Clear clears the buffer but does not reset the size. If
    Get is called on the same PcmBuffer later on with a size that is the
    same as (or less than) it was before the call to Clear, the "else"
    branch is taken and the memory of buffer (at the address of nullptr)
    is poisoned instead of the necessary allocation being performed. A
    memset or memcpy on the returned pointer (nullptr) causes a
    segmentation fault."
    105b431e
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
mpd.service.in Loading commit data...
valgrind.suppressions Loading commit data...