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:
+12
-2
@@ -158,8 +158,18 @@ int bacapp_encode_application_data(
|
||||
return apdu_len;
|
||||
}
|
||||
|
||||
/* decode the data and store it into value.
|
||||
Return the number of octets consumed. */
|
||||
/**
|
||||
* @brief Decode the data and store it into value.
|
||||
* Return the number of octets consumed.
|
||||
*
|
||||
* @param apdu Receive buffer
|
||||
* @param tag_data_type Data type of the given tag
|
||||
* @param len_value_type Count of bytes of given tag
|
||||
* @param value Pointer to the application value structure,
|
||||
* used to store the decoded value to.
|
||||
*
|
||||
* @return Number of octets consumed.
|
||||
*/
|
||||
int bacapp_decode_data(uint8_t *apdu,
|
||||
uint8_t tag_data_type,
|
||||
uint32_t len_value_type,
|
||||
|
||||
Reference in New Issue
Block a user