Possible segfault in modbus_reply and modbus_reply_exception #269

Closed
sstiller opened this Issue Jun 10, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@sstiller

In both functions (modbus.c) there is a check if the pointer ctx is NULL. But some lines above, the pointer is used:
int offset = ctx->backend->header_length;
This makes the test useless because the software already should have crashed.

@stephane

This comment has been minimized.

Show comment
Hide comment
@stephane

stephane Jun 11, 2015

Owner

Could you provide a github link to the concerned lines, please?

Owner

stephane commented Jun 11, 2015

Could you provide a github link to the concerned lines, please?

@stephane stephane closed this in 0e2f470 Jun 11, 2015

@stephane

This comment has been minimized.

Show comment
Hide comment
@stephane

stephane Jun 11, 2015

Owner

Thank you for your bug report.

Owner

stephane commented Jun 11, 2015

Thank you for your bug report.

georgidimov added a commit to georgidimov/libmodbus that referenced this issue Jul 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment