Skip to content

fix(orchestrator): add bounds check for offset in cloud_orchestrator.zig parsing #174

@gHashTag

Description

@gHashTag

Task

In src/tri/cloud_orchestrator.zig around line 289, the JSON parsing loop sets offset = sid_end + 1 without checking bounds. If sid_end equals content.len, the next iteration could access out-of-bounds memory.

Current Code

offset = sid_end + 1;

Fix

Add bounds check:

offset = @min(sid_end + 1, content.len);

File

  • src/tri/cloud_orchestrator.zig — around line 289

Acceptance

  • zig build compiles without errors
  • zig fmt passes
  • @min bounds check present

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions