mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 06:37:08 +00:00
Better sbuffer assertion.
git-svn-id: file:///svn/unbound/trunk@4898 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
fe8b22caa1
commit
d744827f93
@ -160,7 +160,7 @@ sldns_buffer_invariant(sldns_buffer *buffer)
|
||||
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
|
||||
|
||||
|
@ -1195,7 +1195,6 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
|
||||
/* 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 */
|
||||
|
@ -532,7 +532,6 @@ qlist_add_line(struct perfinfo* info, char* line, int no)
|
||||
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);
|
||||
|
@ -155,7 +155,6 @@ static void analyze(sldns_buffer* pkt)
|
||||
{
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user