Diff between 2f52afa21a26354a540c1a288480511e90567c6f and 0599a7fa9fce1bbd4a543c6f5bb63f911a676872
Changed Files
| File | Additions | Deletions | Status |
| mesh/cfgmod-server.c | +2 | -2 | modified |
Full Patch
diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c
index 3d7efc4..f64566d 100644
--- a/mesh/cfgmod-server.c
+++ b/mesh/cfgmod-server.c
@@ -736,7 +736,7 @@ static uint16_t cfg_net_tx_msg(struct mesh_node *node, const uint8_t *pkt,
static uint16_t get_composition(struct mesh_node *node, uint8_t page,
uint8_t *buf)
{
- const uint8_t *comp;
+ const uint8_t *comp = NULL;
uint16_t len = 0;
size_t i;
@@ -751,7 +751,7 @@ static uint16_t get_composition(struct mesh_node *node, uint8_t page,
break;
}
- if (!len)
+ if (!len || !comp)
return 0;
*buf++ = page;