Skip to content

Improve RAMFile error handling by returning NULL on read failure - #230

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/ramfile-read-error-handling
Open

seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/ramfile-read-error-handling

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 5, 2026

Copy link
Copy Markdown

Fixes CLIENT-1RQ. The issue was that: Map stream read failure causes a null pointer to be dereferenced during subsequent data parsing.

  • Modified RAMFile::readEntireAndClose to return NULL and call close() if m_data is unexpectedly NULL, correctly signaling a read failure instead of returning a dummy buffer.
  • Updated DataChunk::load in Generals and GeneralsMD to check for a NULL return value from readEntireAndClose.
  • If readEntireAndClose fails, DataChunk::load now sets the size to 0 and returns false, ensuring proper failure propagation.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 8190457

Not quite right? Click here to continue debugging with Seer.

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.

0 participants