mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-16 12:12:59 +08:00
Add mbuf_append result check
PUBLISHED_FROM=967a7ff3684e548ddbfe92365f7718a99e14d098
This commit is contained in:
parent
023b55f2e5
commit
a2192ae483
@ -11618,7 +11618,7 @@ uint32_t mg_coap_compose(struct mg_coap_message *cm, struct mbuf *io) {
|
||||
|
||||
/* saving previous lenght to handle non-empty mbuf */
|
||||
prev_io_len = io->len;
|
||||
mbuf_append(io, NULL, packet_size);
|
||||
if (mbuf_append(io, NULL, packet_size) == 0) return MG_COAP_ERROR;
|
||||
ptr = io->buf + prev_io_len;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user