}
cl->txq_ofs += written;
+ cl->txq_len -= written;
if (cl->txq_ofs < ub->len + sizeof(ub->hdr))
break;
+ cl->txq_ofs = 0;
ubus_msg_list_free(ubl);
}
if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))
goto out;
+ if (blob_raw_len(&cl->hdrbuf.data) < sizeof(struct blob_attr))
+ goto disconnect;
if (blob_pad_len(&cl->hdrbuf.data) > UBUS_MAX_MSGLEN)
goto disconnect;