Lines Matching refs:len
26 buf_open(size_t len)
32 if ((buf->buf = malloc(len)) == NULL) {
36 buf->size = len;
42 buf_add(struct buf *buf, void *data, size_t len)
44 if (buf->wpos + len > buf->size)
47 memcpy(buf->buf + buf->wpos, data, len);
48 buf->wpos += len;
119 if (hdr.len < sizeof(hdr) + sizeof(size_t))
122 if (hdr.len < medium_len + sizeof(size_t) + sizeof(hdr)
133 if (hdr.len < medium_len + reason_len + sizeof(hdr) ||
150 if (hdr.len < totlen)
156 if (hdr.len < totlen || filename_len == SIZE_T_MAX)
167 if (hdr.len < totlen || servername_len == SIZE_T_MAX)
179 if (hdr.len < totlen || prefix_len == SIZE_T_MAX)
190 if (hdr.len < totlen)
194 lease.options[i].len = optlen;
197 if (hdr.len < totlen || optlen == SIZE_T_MAX)
215 if (lease.options[i].len > 0)
219 if (hdr.len != sizeof(hdr))
225 hdr.len = sizeof(struct imsg_hdr) + sizeof(int);
226 if ((buf = buf_open(hdr.len)) == NULL)