Skip to content

Commit

Permalink
Merge pull request #296 from vstakhov/vstakhov-fix-fuzz
Browse files Browse the repository at this point in the history
Fix issue with setting length when parsing vars
  • Loading branch information
vstakhov authored Apr 20, 2024
2 parents 09c4f3d + 0820e70 commit 0a94bbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ucl_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ ucl_check_variable_safe (struct ucl_parser *parser, const char *ptr, size_t rema
if (parser->var_handler (ptr, remain, &dst, &dstlen, &need_free,
parser->var_data)) {
*found = true;
*out_len = dstlen;

if (need_free) {
free (dst);
}
Expand Down

0 comments on commit 0a94bbd

Please sign in to comment.