Browse Source

Fix segfault on invalid config "duplicate else conditions" (fixes #2065)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2640 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 12 years ago
parent
commit
0bd06a9629
  1. 1
      NEWS
  2. 5
      src/configparser.y
  3. 4
      src/fdevent_linux_rtsig.c

1
NEWS

@ -47,6 +47,7 @@ NEWS
* mod_fastcgi: fix is_local detection, respawn backends if bin-path is set (fixes #897)
* Fix linger-on-close behaviour to avoid rare failure conditions (was r2636, fixes #657)
* mod_fastcgi: restart local procs immediately after they terminated, fix local procs handling
* Fix segfault on invalid config "duplicate else conditions" (fixes #2065)
- 1.4.23 - 2009-06-19
* Added some extra warning options in cmake and fix the resulting warnings (unused/static functions)

5
src/configparser.y

@ -350,7 +350,10 @@ global(A) ::= globalstart LCURLY metalines RCURLY. {
}
condlines(A) ::= condlines(B) eols ELSE condline(C). {
assert(B->context_ndx < C->context_ndx);
if (B->context_ndx >= C->context_ndx) {
fprintf(stderr, "unreachable else condition\n");
ctx->ok = 0;
}
C->prev = B;
B->next = C;
A = C;

4
src/fdevent_linux_rtsig.c

@ -11,7 +11,9 @@
#include <signal.h>
#include <limits.h>
#define __USE_GNU /* a hack in my eyes, should work with _GNU_SOURCE */
#ifndef __USE_GNU
# define __USE_GNU /* a hack in my eyes, should work with _GNU_SOURCE */
#endif
#include <fcntl.h>
#ifdef USE_LINUX_SIGIO

Loading…
Cancel
Save