filter_rewrite_tag: validate new tag (CID 316594)
@@ -322,6 +322,11 @@ static int process_record(const char *tag, int tag_len, msgpack_object map,
/* Release any capture info from 'results' */
flb_regex_results_release(&result);
+ /* Validate new outgoing tag */
+ if (!out_tag) {
+ return FLB_FALSE;
+ }
+
/* Emit record with new tag */
ret = in_emitter_add_record(out_tag, flb_sds_len(out_tag), buf, buf_size,
ctx->ins_emitter);
