Menu

#14 Requesting maximum data element counts causes exception.

open
nobody
None
5
2012-01-18
2012-01-18
No

The ModbusTCPTransport.readResponse() method has a problem when cheching for truncated data streams. Thsi causes a java.lang.IndexOutOfBoundsException. The buffer size is too small for to carry the full length of the data incidated in header when the maximum number of coils, DIs or registered is requested. For example, a request for 2000 DIs (max. allows by spec) generates data area length of 253. This causes the input stream read method, with an offset of 6, to go out of bounds.

Discussion


Log in to post a comment.