diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-05 18:05:33 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-05 23:03:21 +0100 |
commit | 8121ace449d552d53798ca768a74b9be112c7b8b (patch) | |
tree | 50170ae31fd5508cf5fb4f6b50284819a6ca54bc /toxcore/net_crypto.c | |
parent | aa0e3974c5e1d665051ae49a4e4d547fa5f63c30 (diff) |
Make packet data a ptr-to-const.
Ensure that nobody inadvertly modifies the temporary packet data buffer.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index e2d7e494..940feb04 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -2142,7 +2142,7 @@ int connection_status_handler(const Net_Crypto *c, int crypt_connection_id, | |||
2142 | * return 0 on success. | 2142 | * return 0 on success. |
2143 | */ | 2143 | */ |
2144 | int connection_data_handler(const Net_Crypto *c, int crypt_connection_id, int (*connection_data_callback)(void *object, | 2144 | int connection_data_handler(const Net_Crypto *c, int crypt_connection_id, int (*connection_data_callback)(void *object, |
2145 | int id, uint8_t *data, uint16_t length, void *userdata), void *object, int id) | 2145 | int id, const uint8_t *data, uint16_t length, void *userdata), void *object, int id) |
2146 | { | 2146 | { |
2147 | Crypto_Connection *conn = get_crypto_connection(c, crypt_connection_id); | 2147 | Crypto_Connection *conn = get_crypto_connection(c, crypt_connection_id); |
2148 | 2148 | ||