Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: code-by-sia/xi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.5
Choose a base ref
...
head repository: code-by-sia/xi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.6
Choose a head ref
  • 2 commits
  • 10 files changed
  • 1 contributor

Commits on Jul 18, 2026

  1. Configuration menu
    Copy the full SHA
    9bb359a View commit details
    Browse the repository at this point in the history
  2. release: v0.1.6 "Berlin"

    Security hardening of the untrusted-input paths.
    
    - web: fix a remotely reachable 1-byte heap-buffer-overflow WRITE in the request
      reader. The grow check (`len + 4096 > cap`) let len reach exactly cap, so the
      NUL terminator wrote one past the block for any request with >=8 KB of
      headers. Confirmed with AddressSanitizer before/after; also check malloc and
      realloc results instead of using them blind
    - web: cap a buffered request (headers + body) at 32 MB and reject a
      Content-Length above it, so a hostile client cannot grow the buffer until the
      process dies
    - json: bound parse nesting at 200 levels. xj_parse_value recurses per [ or {,
      so a deeply nested body exhausted the C stack and killed the process; it is
      now reported as invalid JSON. Breadth is unaffected
    - text: reject an overflowing repeat() count. `s.len * n` wrapped, under-
      allocated, and let the copy loop write far past the block whenever the count
      came from input
    
    Verified: ASan A/B on the overflow, 264 malformed/random HTTP requests and 405
    malformed JSON documents under ASan with no reports, plus a new
    examples/stdlib/hardening_test.xi. Docs: web.md limits. Toolchain 0.1.6.
    code-by-sia committed Jul 18, 2026
    Configuration menu
    Copy the full SHA
    8dfc725 View commit details
    Browse the repository at this point in the history
Loading