Skip to content

Commit 7c0d863

Browse files
committed
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 <simo@redhat.com>
1 parent 3652da9 commit 7c0d863

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/environ.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ void mag_get_name_attributes(request_rec *req, struct mag_config *cfg,
214214
attr.value = empty_buffer;
215215
attr.display_value = empty_buffer;
216216

217-
if (!mag_get_name_attr(req, name, &attr)) continue;
217+
if (!mag_get_name_attr(req, name, &attr)) break;
218218

219219
if (cfg->name_attributes->output_json) {
220220
mag_add_json_name_attr(req, i == 0, &attr, &json);

0 commit comments

Comments
 (0)