Re: [PATCH 1/4] support: Add resolv_response_set_buffer

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
* Adhemerval Zanella Netto:

>> +void
>> +resolv_response_set_buffer (struct resolv_response_builder *b,
>> +                            const unsigned char *data, size_t length)
>> +{
>> +  if (length > max_response_length)
>> +    FAIL_EXIT1 ("resolv_response_set_buffer: length %zu exceeds maximum %d",
>> +                length, max_response_length);
>> +  memmove (b->buffer, data, length);
>> +  b->offset = length;
>
> This does not update section, current_rdata_offset, or the
> compression_offsets so the resolv_response_builder is left in an
> inconsistent state. Maybe either document it or fail for subsequent
> resolv_response_add_data.

Right.  Section does not need updating, but the others need to be
handled in some way.  I'm going to send a v2.

Thanks,
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.