mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-29 01:57:09 +03:00
async.[ch]: Fix flexible array member 'token' warning
Make token[] token[8] as the maximum size of a token is 8 bytes Check that we do not overflow coap_async_state_t when copying in the token.
This commit is contained in:
1 parent
856236dc6c
commit
a17757ec6e
2 files changed
+6
-6
No files matched your search
@@ -48,7 +48,7 @@ typedef struct coap_async_state_t {
|
||||
coap_tid_t id; /**< transaction id */
|
||||
struct coap_async_state_t *next; /**< internally used for linking */
|
||||
size_t tokenlen; /**< length of the token */
|
||||
unsigned char token[]; /**< the token to use in a response */
|
||||
uint8_t token[8]; /**< the token to use in a response */
|
||||
} coap_async_state_t;
|
||||
|
||||
/* Definitions for Async Status Flags These flags can be used to control the
|
||||
|
||||
Reference in new issue
Block a user