msgreply.c (da8c8390) msgreply.c (57403691)
1/*
2 * util/data/msgreply.c - store message and reply data.
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 229 unchanged lines hidden (view full) ---

238 case LDNS_RDF_TYPE_STR:
239 len = sldns_buffer_current(pkt)[0] + 1;
240 break;
241 default:
242 len = get_rdf_size(desc->_wireformat[rdf]);
243 break;
244 }
245 if(len) {
1/*
2 * util/data/msgreply.c - store message and reply data.
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 229 unchanged lines hidden (view full) ---

238 case LDNS_RDF_TYPE_STR:
239 len = sldns_buffer_current(pkt)[0] + 1;
240 break;
241 default:
242 len = get_rdf_size(desc->_wireformat[rdf]);
243 break;
244 }
245 if(len) {
246 log_assert(len <= pkt_len);
246 memmove(to, sldns_buffer_current(pkt), len);
247 to += len;
248 sldns_buffer_skip(pkt, (ssize_t)len);
247 memmove(to, sldns_buffer_current(pkt), len);
248 to += len;
249 sldns_buffer_skip(pkt, (ssize_t)len);
249 log_assert(len <= pkt_len);
250 pkt_len -= len;
251 }
252 rdf++;
253 }
254 }
255 /* copy remaining rdata */
256 if(pkt_len > 0)
257 memmove(to, sldns_buffer_current(pkt), pkt_len);

--- 998 unchanged lines hidden ---
250 pkt_len -= len;
251 }
252 rdf++;
253 }
254 }
255 /* copy remaining rdata */
256 if(pkt_len > 0)
257 memmove(to, sldns_buffer_current(pkt), pkt_len);

--- 998 unchanged lines hidden ---