Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41b0239

Browse files
committed
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 partiallyinitialized on the stack. This was introduced in0785d1b.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
1 parent342fb8a commit41b0239

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/common/jsonapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ json_lex(JsonLexContext *lex)
15361536
jsonapi_StrValType*ptok=&(lex->inc_state->partial_token);
15371537
size_tadded=0;
15381538
booltok_done= false;
1539-
JsonLexContextdummy_lex;
1539+
JsonLexContextdummy_lex= {0};
15401540
JsonParseErrorTypepartial_result;
15411541

15421542
if (ptok->data[0]=='"')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp