_MODBUSINO_RTU_MAX_ADU_LENGTH is wrong
karlp opened this issue · comments
I started using rather larger modbus tables, and starting hitting all sorts of buffer overflows :( (I have a very old fork, that was missing some of the earlier fixes for this)
But immediately, the define for RTU_MAX_ADU is just wrong. Setting this to 256 properly, as per page 5 of modbus app proto 1.1b3 results in requests for more than 64 registers succeeding, but requesting 128 registers for instance, passes validation but overflows. I know this is the "very very very cut down" version, so I'm not hanging out for a heap of fixes, just letting you know.
OK thank you for your report. I'll just leave a comment about that in the code.