Project

General

Profile

Bug #1105 ยป 0080-cma_get_parameter-Fix-assert-with-parameter-format-v.patch

Marko Lindqvist, 11/12/2024 12:13 AM

View differences:

client/agents/cma_core.c
#define ALWAYS_APPLY_AT_SERVER FALSE
#define SAVED_PARAMETER_SIZE 30
#define SAVED_PARAMETER_SIZE_OLD 29
#define CMA_ATTR_VERSION 3
#define CMA_ATTR_VERSION_MIN_SUPPORTED 2
......
struct cm_parameter *parameter)
{
size_t len;
char buffer[SAVED_PARAMETER_SIZE];
char buffer[MAX(SAVED_PARAMETER_SIZE, SAVED_PARAMETER_SIZE_OLD)];
struct data_in din;
int version, dummy;
......
if (len == 0) {
return FALSE;
}
fc_assert_ret_val(len == SAVED_PARAMETER_SIZE, FALSE);
fc_assert_ret_val(len == SAVED_PARAMETER_SIZE || len == SAVED_PARAMETER_SIZE_OLD,
FALSE);
dio_input_init(&din, buffer, len);
    (1-1/1)