Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with setting length when parsing vars #296

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix issue with setting length when parsing vars
Issue: #287
  • Loading branch information
vstakhov committed Apr 20, 2024
commit 0820e70855c42cc8bfdd6c737d0ef41bd6f3b78c
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
Loading