Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Crash due to void* dereference level mismatch in parser #24

Open
mjrgh opened this issue Jul 6, 2019 · 0 comments
Open

Crash due to void* dereference level mismatch in parser #24

mjrgh opened this issue Jul 6, 2019 · 0 comments

Comments

@mjrgh
Copy link

mjrgh commented Jul 6, 2019

There are a few places in parser.c where void* pointers in the parser struct are used at the wrong indirection level. The C compiler doesn't catch these because of the opaque void* typing, but they cause crashes at run-time.

parser.c line 1254:    katanaget_text(parser->scanner)   // Should be *parser->scanner

parser.c line 1256:  YYSTYPE * s = katanaget_lval(parser->scanner);  // Should be *parser->scanner

parser.c line 1258: ...katana_get_previous_state(parser->scanner); // Should be *parser->scanner

parser.c line 1272:    katanaget_text(parser->scanner)   // Should be *parser->scanner
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant