xserver-multidpi/record
Erkki Seppälä 0801afbd7c record: avoid crash when calling RecordFlushReplyBuffer recursively
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: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-02-24 18:45:54 -08:00
..
Makefile.am get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE 2006-07-18 18:17:38 -04:00
record.c record: avoid crash when calling RecordFlushReplyBuffer recursively 2011-02-24 18:45:54 -08:00
set.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
set.h Death to RCS tags. 2007-06-29 14:06:52 -04:00