Skip to content
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
4 changes: 4 additions & 0 deletions libclamav/jsparse/js-norm.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,10 @@ static void handle_df(const yystype *tokens, size_t start, struct decode_result
static void handle_eval(struct tokens *tokens, size_t start, struct decode_result *res)
{
res->txtbuf.data = TOKEN_GET(&tokens->data[start], string);

if (start + 1 >= tokens->cnt)
return;

if (res->txtbuf.data && tokens->data[start + 1].type == TOK_PAR_CLOSE) {
TOKEN_SET(&tokens->data[start], string, NULL);
res->txtbuf.pos = strlen(res->txtbuf.data);
Expand Down