Repository navigation
fix(PIMETextService): enforce maximum buffer size limit on IPC pipe reads (#956) - #957
Merged
Merged
Conversation
PCMan
force-pushed
the
fix/issue-956-limit-ipc-read-buffer
branch
from
October 18, 2026 08:50
6b5cd2b to
4ee57ea
Compare
…eads (#956) WHAT: - Add kMaxIpcMessageLength (4 MB) constant to Client class in PIMEClient.h. - Check readBuffer_ size against kMaxIpcMessageLength during callRpcPipe() in PIMEClient.cpp. - Clear readBuffer_ and fail the RPC if message length exceeds limit. WHY: - Previously, callRpcPipe buffered chunks from the named pipe until encountering a newline without any size limit. - If a malfunctioning server streamed data without newlines, readBuffer_ would expand indefinitely and exhaust memory. Generated with assistance from Antigravity (Google DeepMind).
PCMan
force-pushed
the
fix/issue-956-limit-ipc-read-buffer
branch
from
October 18, 2026 09:19
4ee57ea to
a04e916
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #956
WHAT
eadBuffer_\ and return \alse, which aborts the RPC, closes the corrupted/runaway pipe connection, and resets state.
WHY
Previously, \callRpcPipe\ appended incoming pipe chunks to
eadBuffer_\ indefinitely until a newline character was reached. If a malfunctioning or unresponsive server streamed data without newlines,
eadBuffer_\ would expand without bound until triggering \std::bad_alloc\ and crashing the host process.
Generated with assistance from Antigravity (Google DeepMind).