Skip to content

Throw exception when request has wrong quantity #32

@kalwinskidawid

Description

@kalwinskidawid

Hey, I found a bug. When you try send request eg. with huge quantity then program will throw exception:

Application: ModbusSlave.exe Architecture version: v4.0.30319 Description: the process was 
aborted due to an unhandled exception. Exception information: 
System.OverflowException w 
ModbusLib.Protocols.ModbusCodecReadMultipleRegisters.ServerDecode(ModbusLib.Protocols.ModbusCommand, 
ModbusLib.ByteArrayReader) w 
ModbusLib.Protocols.ModbusTcpCodec.ModbusLib.Protocols.IProtocolCodec.ServerDecode(ModbusLib.CommDataBase) 
w ModbusLib.TcpServer.Worker() w 
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object, Boolean) w 
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object, Boolean) w 
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object) w 
System.Threading.ThreadHelper.ThreadStart()

Example request 000100000006010363c09c85

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions