Skip to content

Commit 267674b

Browse files
committed
pack: relax token validation to reject tokens missing an end position
Signed-off-by: Eduardo Silva <[email protected]>
1 parent d32ef07 commit 267674b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flb_pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static char *tokens_to_msgpack(struct flb_pack_state *state,
217217
for (i = 0; i < arr_size ; i++) {
218218
t = &tokens[i];
219219

220-
if (t->start == -1 || t->end == -1 || (t->start == 0 && t->end == 0)) {
220+
if (t->start < 0 || t->end <= 0) {
221221
msgpack_sbuffer_destroy(&sbuf);
222222
return NULL;
223223
}

0 commit comments

Comments
 (0)