diff --git a/modules/evs/fsw/src/cfe_evs_task.h b/modules/evs/fsw/src/cfe_evs_task.h index e765adecd..54d2092cb 100644 --- a/modules/evs/fsw/src/cfe_evs_task.h +++ b/modules/evs/fsw/src/cfe_evs_task.h @@ -60,7 +60,7 @@ #define CFE_EVS_MAX_FILTER_COUNT 65535 #define CFE_EVS_MAX_SQUELCH_COUNT 255 #define CFE_EVS_PIPE_NAME "EVS_CMD_PIPE" -#define CFE_EVS_MAX_PORT_MSG_LENGTH (CFE_MISSION_EVS_MAX_MESSAGE_LENGTH + OS_MAX_API_NAME + 30) +#define CFE_EVS_MAX_PORT_MSG_LENGTH (CFE_MISSION_EVS_MAX_MESSAGE_LENGTH + OS_MAX_API_NAME + 19) /* Since CFE_EVS_MAX_PORT_MSG_LENGTH is the size of the buffer that is sent to * print out (using OS_printf), we need to check to make sure that the buffer @@ -70,6 +70,13 @@ #error CFE_EVS_MAX_PORT_MSG_LENGTH cannot be greater than OS_BUFFER_SIZE! #endif +/* If CFE_EVS_MAX_PORT_MSG_LENGTH is greater than (CFE_MISSION_EVS_MAX_MESSAGE_LENGTH + * + OS_MAX_API_NAME + 19), it could result in the truncation of the new line + * character appended downstream. */ +#if CFE_EVS_MAX_PORT_MSG_LENGTH > (CFE_MISSION_EVS_MAX_MESSAGE_LENGTH + OS_MAX_API_NAME + 19) +#error CFE_EVS_MAX_PORT_MSG_LENGTH exceeds the maximum allowable length to prevent truncation! +#endif + /************************ Internal Structure Definitions *****************************/ typedef struct