The following series fixes a failure in the logic for handling
buffers for
inclusion which will result in a segfault if the include command is
found
as part of processing an in memory buffer (string).
The first patch adds a failing test case to demonstrate the failure
while
the two following changes correct the problem in the lexer code so
that
a NULL pointer dereference will be avoided.
PATCH 1/3: tests: add failing test for include() when parsing a
buffer
PATCH 2/3: confuse: do not move to a NULL buffer
PATCH 3/3: confuse: make EOF detection independent of depth from
buffer processing
It has been tested in Linux (x86 and amd64) with trunk as well as
backported
to the currently released version of libconfuse (2.6)
src/lexer.l | 5 +++--
tests/Makefile.am | 2 +-
tests/include.c | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 3 deletions(-)
create mode 100644 tests/include.c
Carlo
_______________________________________________
Confuse-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/confuse-devel