if (sz > 0) {
/* Format rdf data according RFC3845 Section 2.1.2 (see above)
*/
- dptr = data = LDNS_XMALLOC(uint8_t, sz);
+ dptr = data = LDNS_CALLOC(uint8_t, sz);
if (!data) {
return NULL;
}
/* Format rdf data according RFC3845 Section 2.1.2 (see above)
*/
dptr = data = LDNS_XMALLOC(uint8_t, sz);
+ memset(data, value, sz);
if (!data) {
return LDNS_STATUS_MEM_ERR;
}
if (windows[i]) {
*dptr++ = (uint8_t)i;
*dptr++ = (uint8_t)(windows[i] / 8 + 1);
- memset(dptr, value, dptr[-1]);
dptr += dptr[-1];
}
}