Fix Max instance log and uci list buffer size

This commit is contained in:
Vivek Kumar Dutta 2025-03-04 18:05:30 +05:30
parent 2976fdda4a
commit 38636715ad
No known key found for this signature in database
GPG key ID: 4E09F5AD8265FD4C
2 changed files with 4 additions and 2 deletions

View file

@ -55,7 +55,9 @@ static inline int DM_LINK_INST_OBJ(struct dmctx *dmctx, DMNODE *parent_node, voi
{
dmctx->faultcode = dm_link_inst_obj(dmctx, parent_node, data, instance);
if (dmctx->stop || parent_node->num_of_entries >= BBF_MAX_OBJECT_INSTANCES) {
BBFDM_ERR("%s has reached max %d number of entries", parent_node->current_object, BBF_MAX_OBJECT_INSTANCES);
if (parent_node->num_of_entries >= BBF_MAX_OBJECT_INSTANCES) {
BBFDM_ERR("%s has reached max %d number of entries", parent_node->current_object, BBF_MAX_OBJECT_INSTANCES);
}
return DM_STOP;
}
return DM_OK;

View file

@ -105,7 +105,7 @@ char *dmuci_list_to_string(struct uci_list *list, const char *delimitor)
{
if (list) {
struct uci_element *e = NULL;
char list_val[512] = {0};
char list_val[4096] = {0};
unsigned pos = 0;
list_val[0] = 0;