Skip to content

Commit

Permalink
parser: ltsv: fix potential overflow (oss-fuzz)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
DavidKorczynski authored and edsiper committed Apr 29, 2020
1 parent 73d30b9 commit b0baec3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flb_parser_logfmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ static int logfmt_parser(struct flb_parser *parser,
while ((c < end) && ident_byte[*c]) {
c++;
}
if (c == end) {
break;
}

key_len = c - key;
/* value */
value_len = 0;
value_str = FLB_FALSE;
value_escape = FLB_FALSE;

if (*c == '=') {
c++;
if (c < end) {
Expand Down

0 comments on commit b0baec3

Please sign in to comment.