Skip to content

Commit

Permalink
Specify that buffer length for tox_conference_peer_get_name given by …
Browse files Browse the repository at this point in the history
…size function
  • Loading branch information
zugz committed Jan 21, 2019
1 parent a4bca35 commit d506208
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions toxcore/tox.api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ namespace friend {
* Write the status message of the friend designated by the given friend number to a byte
* array.
*
* Call $size to determine the allocation size for the `status_name`
* Call $size to determine the allocation size for the `status_message`
* parameter.
*
* The data written to `status_message` is equal to the data received by the last
Expand Down Expand Up @@ -2294,7 +2294,10 @@ namespace conference {

/**
* Copy the name of peer_number who is in conference_number to name.
* name must be at least $MAX_NAME_LENGTH long.
*
* Call $size to determine the allocation size for the `name` parameter.
*
* @param name A valid memory region large enough to store the peer's name.
*
* @return true on success.
*/
Expand Down Expand Up @@ -2339,7 +2342,10 @@ namespace conference {

/**
* Copy the name of offline_peer_number who is in conference_number to name.
* name must be at least $MAX_NAME_LENGTH long.
*
* Call $size to determine the allocation size for the `name` parameter.
*
* @param name A valid memory region large enough to store the peer's name.
*
* @return true on success.
*/
Expand Down
12 changes: 9 additions & 3 deletions toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ size_t tox_friend_get_status_message_size(const Tox *tox, uint32_t friend_number
* Write the status message of the friend designated by the given friend number to a byte
* array.
*
* Call tox_friend_get_status_message_size to determine the allocation size for the `status_name`
* Call tox_friend_get_status_message_size to determine the allocation size for the `status_message`
* parameter.
*
* The data written to `status_message` is equal to the data received by the last
Expand Down Expand Up @@ -2609,7 +2609,10 @@ size_t tox_conference_peer_get_name_size(const Tox *tox, uint32_t conference_num

/**
* Copy the name of peer_number who is in conference_number to name.
* name must be at least TOX_MAX_NAME_LENGTH long.
*
* Call tox_conference_peer_get_name_size to determine the allocation size for the `name` parameter.
*
* @param name A valid memory region large enough to store the peer's name.
*
* @return true on success.
*/
Expand Down Expand Up @@ -2645,7 +2648,10 @@ size_t tox_conference_offline_peer_get_name_size(const Tox *tox, uint32_t confer

/**
* Copy the name of offline_peer_number who is in conference_number to name.
* name must be at least TOX_MAX_NAME_LENGTH long.
*
* Call tox_conference_offline_peer_get_name_size to determine the allocation size for the `name` parameter.
*
* @param name A valid memory region large enough to store the peer's name.
*
* @return true on success.
*/
Expand Down

0 comments on commit d506208

Please sign in to comment.