• Erkki Seppälä's avatar
    record: avoid crash when calling RecordFlushReplyBuffer recursively · 0801afbd
    Erkki Seppälä authored
    RecordFlushReplyBuffer can call itself recursively through
    WriteClient->CallCallbacks->_CallCallbacks->RecordFlushAllContexts
    when the recording client's buffer cannot be completely emptied in one
    WriteClient. When a such a recursion occurs, it will not be broken out
    of which results in segmentation fault when the stack is exhausted.
    
    This patch adds a counter (a flag, really) that guards against this
    situation, to break out of the recursion.
    
    One alternative to this change would be to change _CallCallbacks to
    check the corresponding counter before the callback loop, but that
    might affect existing behavior, which may be relied upon.
    Reviewed-by: default avatarRami Ylimäki <rami.ylimaki@vincit.fi>
    Signed-off-by: default avatarErkki Seppälä <erkki.seppala@vincit.fi>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    0801afbd
Name
Last commit
Last update
..
Makefile.am Loading commit data...
record.c Loading commit data...
set.c Loading commit data...
set.h Loading commit data...