Repository navigation
Commit e086664
committed
lexer: fix a minor memleak in jp_get_token()/match_token()
jp_get_token() is using a stack allocated jp_opcode op and
is not using jp_alloc_op() or jp_free().
jp_get_token() is calling match_token() which might assign op->str
and allocate it via strdup().
Fixes: TOB-OWRT-3
Reported-by: Trail of Bits
Signed-off-by: Alexander Couzens <[email protected]>1 parent e5a07f4 commit e086664
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
509 | 510 | | |
510 | 511 | | |
511 | 512 | | |
| |||
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
522 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
523 | 529 | | |
0 commit comments