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:
Roy Schneider
2020-04-16 17:38:49 +02:00
committed by GitHub
parent 1ead6acea5
commit 8f13d59629
16 changed files with 987 additions and 360 deletions
+12 -2
View File
@@ -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,