We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In lib/lpeg.c, function verify:
static int verify (lua_State *L, Instruction *op, const Instruction *p, Instruction *e, int postable, int rule) { static const char dummy[] = ""; Stack back[MAXBACK]; int backtop = 0; /* point to first empty slot in back */ while (p != e) { switch ((Opcode)p->i.code) { case IRet: { p = back[--backtop].p; continue; } ...... case IFunc: { const char *r = (p+1)->f((p+2)->buff, dummy, dummy, dummy); if (r == NULL) goto fail; p += p->i.offset; continue; } } } ......
If (Opcode)p->i.code == IRet then array back will be accessed on index -1.
If we first enter case IFunc and then case IRet, array back will be uninitialized, and thus p will contain garbage value.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In lib/lpeg.c, function verify:
If (Opcode)p->i.code == IRet then array back will be accessed on index -1.
If we first enter case IFunc and then case IRet, array back will be uninitialized, and thus
p will contain garbage value.
The text was updated successfully, but these errors were encountered: