assert(buffer != NULL);
assert(buffer->_position <= buffer->_limit || buffer->_vfixed);
assert(buffer->_limit <= buffer->_capacity);
- assert(buffer->_data != NULL || (buffer->_vfixed && buffer->_capacity == 0));
+ assert(buffer->_data != NULL || (buffer->_vfixed && buffer->_capacity == 0 && buffer->_limit == 0));
}
#endif
/* create packet with EDNS */
pend->buffer = sldns_buffer_new(512);
log_assert(pend->buffer);
- log_assert(pend->buffer->_data);
sldns_buffer_write_u16(pend->buffer, 0); /* id */
sldns_buffer_write_u16(pend->buffer, flags);
sldns_buffer_write_u16(pend->buffer, 1); /* qdcount */
printf("error parsing query %d: %s\n", no, line);
exit(1);
}
- log_assert(info->buf->_data);
sldns_buffer_write_u16_at(info->buf, 0, (uint16_t)info->qlist_size);
if(info->qlist_size + 1 > info->qlist_capacity) {
qlist_grow_capacity(info);
{
uint16_t i, f, qd, an, ns, ar;
int rrnum = 0;
- log_assert(pkt && pkt->_data);
printf("packet length %d\n", (int)sldns_buffer_limit(pkt));
if(sldns_buffer_limit(pkt) < 12) return;