According to the documentation, Setting the data threshold to zero disables the
data threshold alltogether. Let's make sure we actually implement this behaviour
in sd_journal_enumerate_fields() by only applying the data threshold if it exceeds
zero.
(cherry picked from commit
adbd80f51088058d55e703abe0ac11476cfe0ba4)
if (memchr(o->field.payload, 0, sz))
return -EBADMSG;
- if (sz > j->data_threshold)
+ if (j->data_threshold > 0 && sz > j->data_threshold)
sz = j->data_threshold;
if (!GREEDY_REALLOC(j->fields_buffer, sz + 1))