Skip to content

test: avoid unbounded NotePing request reads#244

Merged
zfields merged 1 commit into
blues:ray/autobaudfrom
zakoverflow:zak/pr239-ci-fix
Jun 3, 2026
Merged

test: avoid unbounded NotePing request reads#244
zfields merged 1 commit into
blues:ray/autobaudfrom
zakoverflow:zak/pr239-ci-fix

Conversation

@zakoverflow

Copy link
Copy Markdown
Contributor

Summary

  • make the NotePing fake treat the request as length-delimited
  • avoid calling strstr on a newline-terminated, non-NUL-terminated request buffer
  • reuse the bounded copy for JSON parsing

Verification

  • docker run --rm -v /home/ubuntu/.openclaw/workspace/note-c:/note-c -w /note-c ghcr.io/blues/note_c_ci:latest bash -lc 'rm -rf build && cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build --target NotePing_test -j2 && cd build && valgrind --track-origins=yes --leak-check=full ./test/NotePing_test "Scenario: NotePing"'

Valgrind result: ERROR SUMMARY: 0 errors from 0 contexts.

Notes

This targets ray/autobaud so it can be merged into #239 without pulling in unrelated master changes.

@zfields zfields merged commit cb45b41 into blues:ray/autobaud Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants