Skip to content

Fix: guard against NULL reader when MPS file cannot be opened#96

Merged
ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
LucasBoTang:fix/mps-reader-open-failure
Jul 1, 2026
Merged

Fix: guard against NULL reader when MPS file cannot be opened#96
ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
LucasBoTang:fix/mps-reader-open-failure

Conversation

@LucasBoTang

Copy link
Copy Markdown
Collaborator

Fixed a crash in read_mps_file() when the input MPS file cannot be opened.

Previously, if fast_reader_open(filename) returned NULL, the function printed an error and continued into the parsing loop, which later called fast_reader_gets() with a NULL reader, causing a solution on an empty problem.

The fix is simply to return NULL immediately after the open failure in src/mps_parser.c.

@ZedongPeng ZedongPeng self-requested a review July 1, 2026 03:07
@ZedongPeng ZedongPeng merged commit 26f8919 into MIT-Lu-Lab:main Jul 1, 2026
16 checks passed
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