mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
MINOR: promex: Always limit the number of labels dumped for each metric
It was not an issue since now, be a way to register modules on promex will be added. Thus it is important to add some extra checks. Here, we take care to never dump more than the max labels allowed.
This commit is contained in:
parent
7ad9266ad8
commit
5a48a94dcc
@ -536,7 +536,7 @@ static int promex_dump_metric(struct appctx *appctx, struct htx *htx, struct ist
|
||||
if (istcat(out, ist("{"), max) == -1)
|
||||
goto full;
|
||||
|
||||
for (i = 0; isttest(labels[i].name); i++) {
|
||||
for (i = 0; i < PROMEX_MAX_LABELS && isttest(labels[i].name); i++) {
|
||||
if (!isttest(labels[i].value))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user