summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-01-24 18:03:21 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-24 18:03:21 +0100
commit0ba1782dff46992c24b3b99ae7f6f4ef41fb35b5 (patch)
treec7269f191a41ee763c0af85bb803c86cf7df4aaa
parent0b5980df018f39af270de26f7a1b94d963a827db (diff)
downloadrsyslog-0ba1782dff46992c24b3b99ae7f6f4ef41fb35b5.tar.gz
rsyslog-0ba1782dff46992c24b3b99ae7f6f4ef41fb35b5.tar.xz
rsyslog-0ba1782dff46992c24b3b99ae7f6f4ef41fb35b5.zip
increased max config file line size to 64k
We now also emit an error message if even 64k is not enough (not doing so previously may rightfully be considered as a bug)
-rw-r--r--ChangeLog3
-rw-r--r--runtime/conf.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a5a5fd6e..2bf59521 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
---------------------------------------------------------------------------
Version 4.8.1 [v4-stable], 2011-09-??
+- increased max config file line size to 64k
+ We now also emit an error message if even 64k is not enough (not
+ doing so previously may rightfully be considered as a bug)
- bugfix: $ActionExecOnlyOnce interval did not work properly
Thanks to Tomas Heinrich for the patch
- bugfix: potential abort if ultra-large file io buffers are used and
diff --git a/runtime/conf.c b/runtime/conf.c
index 0da4a9c8..69a96306 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -27,7 +27,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#define CFGLNSIZ 4096 /* the maximum size of a configuraton file line, after re-combination */
+#define CFGLNSIZ 64*1024 /* the maximum size of a configuraton file line, after re-combination */
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
@@ -446,6 +446,9 @@ processConfFile(uchar *pConfFile)
if ((p - cbuf) > CFGLNSIZ - 30) {
/* Oops the buffer is full - what now? */
cline = cbuf;
+ dbgprintf("buffer overflow extending config file\n");
+ errmsg.LogError(0, RS_RET_CONFIG_ERROR,
+ "error: config file line %d too long", iLnNbr);
} else {
*p = 0;
cline = p;