jsonapi: fully initialize dummy lexer
authorPeter Eisentraut
Thu, 17 Oct 2024 06:23:46 +0000 (08:23 +0200)
committerPeter Eisentraut
Thu, 17 Oct 2024 06:23:46 +0000 (08:23 +0200)
commit41b023946dfd20acbc4f3b14650a032eb46f5216
tree2ca1cdd1c955d4d41d0babe2e372fa7d2fef3fce
parent342fb8a332007fb64fb1450e28194c36e9da3d6b
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 
Reported-by: Alexander Lakhin
Discussion: https://www.postgresql.org/message-id/CAOYmi+n9QWr4gsAADZc6qFQjFViXQYVk=gBy_EvxuqsgPJcb_g@mail.gmail.com
src/common/jsonapi.c