From 7c0d8634541da5804f711a0e777b3ab03e897911 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 14 Jan 2016 10:24:17 -0500 Subject: [PATCH] Fix potential loop when requesting attribute data. If this function fail we are better off abandoning the whole quest, continueing here may end us up in an infinite loop where the fucntion keeps failing w/o changing attr.more Thanks to Alejandro Perez for finding this flaw. Signed-off-by: Simo Sorce --- src/environ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environ.c b/src/environ.c index 1ea72e0..f9bbf30 100644 --- a/src/environ.c +++ b/src/environ.c @@ -214,7 +214,7 @@ void mag_get_name_attributes(request_rec *req, struct mag_config *cfg, attr.value = empty_buffer; attr.display_value = empty_buffer; - if (!mag_get_name_attr(req, name, &attr)) continue; + if (!mag_get_name_attr(req, name, &attr)) break; if (cfg->name_attributes->output_json) { mag_add_json_name_attr(req, i == 0, &attr, &json); -- 2.1.4