mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 01:33:06 +00:00
libdrgn: language_c: add missing error check in c_parse_abstract_declarator()
Found with clang-static-analyzer. Reported-by: Kevin Svetlitski <svetlitski@fb.com> Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
parent
f09fd13ef6
commit
8a41adc1b0
@ -2445,6 +2445,8 @@ c_parse_abstract_declarator(struct drgn_program *prog,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = drgn_lexer_peek(lexer, &token);
|
err = drgn_lexer_peek(lexer, &token);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
if (token.kind == C_TOKEN_LPAREN ||
|
if (token.kind == C_TOKEN_LPAREN ||
|
||||||
token.kind == C_TOKEN_LBRACKET) {
|
token.kind == C_TOKEN_LBRACKET) {
|
||||||
struct c_declarator *tmp;
|
struct c_declarator *tmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user