jsonapi: fully initialize dummy lexer

Peter Eisentraut <peter@eisentraut.org>

Commit: 41b023946dfd20acbc4f3b14650a032eb46f5216
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2024-10-17T06:23:46Z
Releases: 18.0
jsonapi: fully initialize dummy lexer

Valgrind reports that checks on lex->inc_state are undefined for the
"dummy lexer" used for incremental parsing, since it's only partially
initialized on the stack. This was introduced in 0785d1b8b2.
Zero-initialize the whole struct.

Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAOYmi+n9QWr4gsAADZc6qFQjFViXQYVk=gBy_EvxuqsgPJcb_g@mail.gmail.com

Files

PathChange+/−
src/common/jsonapi.c modified +1 −1

Discussion