UnstableChanges

Summary

  1. add a few null checks (details)
  2. parseSelector: plug memory leaks, and don't set result until error free (details)
  3. parse/language: ensure parse stack is unwound (details)
  4. test: Add test for bad rule in at media block (details)
Commit f04a25d8c3a44f2800084142c4aafe45be342cc2 by Michael Drake
add a few null checks
import->url was crashing the fuzzer, so I added a check here
The file was modifiedsrc/stylesheet.c (diff)
Commit 03fbf192ca6f8abbc3c9131cdd4c7b506b783122 by Michael Drake
parseSelector: plug memory leaks, and don't set result until error free
complete
The file was modifiedsrc/parse/language.c (diff)
Commit 330cb7e40a47720bc065e87437676974e94dfa12 by Michael Drake
parse/language: ensure parse stack is unwound
handleEndBlockContent invokes handleBlockContent to flush through any
pending tokens before unwinding the parse stack.  The flush may fail,
but the stack unwinding wants to happen anyway, so ensure that it does
before returning the original result.
The file was modifiedsrc/parse/language.c (diff)
Commit 24d53ecc0464a4b7d93bdd39683f4ab89ab1659e by Michael Drake
test: Add test for bad rule in at media block
Based on fuzzing test input generated by Aaron Boxer:
https://github.com/netsurf-browser/libcss/pull/22
Co-authored-by: John-Mark Bell <jmb@netsurf-browser.org>
The file was modifiedtest/data/parse2/dodgy-media-block.dat (diff)