confuse-devel
[Top][All Lists]
Advanced

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

[Confuse-devel] [PATCH 0/3] avoid segfault when using include from a par


From: Carlo Marcelo Arenas Belon
Subject: [Confuse-devel] [PATCH 0/3] avoid segfault when using include from a parsed buffer
Date: Thu, 1 Jan 2009 17:24:23 -0800

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]