Commit a2192ae4 authored by ruslanvaliullin's avatar ruslanvaliullin Committed by Cesanta Bot

Add mbuf_append result check

PUBLISHED_FROM=967a7ff3684e548ddbfe92365f7718a99e14d098
parent 023b55f2
......@@ -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;
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment