#! /bin/sh /usr/share/dpatch/dpatch-run ## fix-eof-in-pool-statement.dpatch by Guillaume Knispel ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix endless loop on unexpected EOF in pool statement @DPATCH@ diff -Nrup dhcp-3.0.4-orig/server/confpars.c dhcp-3.0.4/server/confpars.c --- dhcp-3.0.4-orig/server/confpars.c 2006-02-22 23:43:27.000000000 +0100 +++ dhcp-3.0.4/server/confpars.c 2007-06-26 22:59:03.000000000 +0200 @@ -1293,6 +1293,11 @@ void parse_pool_statement (cfile, group, do { token = peek_token (&val, (unsigned *)0, cfile); switch (token) { + case END_OF_FILE: + parse_warn (cfile, "unexpected end of file"); + done = 1; /* force exiting from do {} while(!done); */ + break; + case NO: next_token (&val, (unsigned *)0, cfile); token = next_token (&val, (unsigned *)0, cfile);