Feature/comments and buffer checks (#73)
* Added comments * Replaced Goto construct * Added apdu_len check * Added comments * Added string limit and reworked printable check * Mainly comments * Just comments * Just comments * decode service request returns now non zero on success * eliminated warnings * Added character string init with length check. * Paranoic length check * Comments and object index checking on read/write. * Check name/desc strings before returning. * Eliminated Goto
This commit is contained in:
@@ -70,6 +70,10 @@ void npdu_handler(BACNET_ADDRESS *src, /* source address */
|
||||
BACNET_ADDRESS dest = { 0 };
|
||||
BACNET_NPDU_DATA npdu_data = { 0 };
|
||||
|
||||
if (pdu_len < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* only handle the version that we know how to handle */
|
||||
if (pdu[0] == BACNET_PROTOCOL_VERSION) {
|
||||
apdu_offset = npdu_decode(&pdu[0], &dest, src, &npdu_data);
|
||||
|
||||
Reference in New Issue
Block a user