uint8_t *attr, data[2048];
TALLOC_CTX *tp_ctx = talloc_init("tp_ctx");
+ bool skip_decode = false; //!< Whether the last encode errored.
+
if (strcmp(filename, "-") == 0) {
fp = stdin;
filename = "<stdin>";
fr_cursor_t cursor;
void *decoder_ctx = NULL;
+ /*
+ * Encode errored, so skip the decode
+ */
+ if (skip_decode) {
+ skip_decode = false;
+ continue;
+ }
+
p += load_test_point_by_command((void **)&tp, test_type, 11, "tp_decode") + 1;
if (tp->test_ctx) decoder_ctx = tp->test_ctx(tp_ctx);
if (fr_pair_list_afrom_str(tp_ctx, p, &head) != T_EOL) {
strerror_concat(output, sizeof(output));
+ skip_decode = true; /* Record that the operation failed */
+
continue;
}
fr_pair_list_free(&head);
talloc_free_children(tp_ctx);
- goto next;
+ goto next_line; /* Bail out of the encode operation */
}
-
attr += enc_len;
+
if (enc_len == 0) break;
}
fr_pair_list_free(&head);
goto error;
- next:
+ next_line:
continue;
}