From 26fac718bfe96a4ae0a733bf6cd39724426265e7 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Fri, 4 Apr 2003 16:29:29 +0000 Subject: [PATCH] set BUFFER_EXTRA_BYTES = MAX_MESSAGE_SIZE --- src/libCom/error/errlog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c index 7cbe4e5f8..402180bc2 100644 --- a/src/libCom/error/errlog.c +++ b/src/libCom/error/errlog.c @@ -40,14 +40,14 @@ #define LOCAL static #endif /* LOCAL */ -/* BUFFER_EXTRA_BYTES is set equal to BUFFER_SIZE because - on vxWorks vsnprintf is not implemented. Thus vxWorks +/* BUFFER_EXTRA_BYTES is set equal to MAX_MESSAGE_SIZE in case + an os cant implement vsnprintf. Such an os is subject to buffer overflow. Allocating an additional - BUFFER_SIZE bytes will at least make this less likely + BUFFER_EXTRA_BYTES bytes will at least make this less likely */ #define BUFFER_SIZE 1280 -#define BUFFER_EXTRA_BYTES BUFFER_SIZE #define MAX_MESSAGE_SIZE 256 +#define BUFFER_EXTRA_BYTES MAX_MESSAGE_SIZE #define TRUNCATE_SIZE 80 #define MAX_ALIGNMENT 8