Use isc_region_t instead of isc_textregion_t as ccpcheck marked
tr.base as not initalised.
* parsing, so append 0 in that case.
*/
if (af == AF_INET6 && (flags & DNS_STYLEFLAG_YAML) != 0) {
- isc_textregion_t tr;
- isc_buffer_usedregion(target, (isc_region_t *)&tr);
- if (tr.base[tr.length - 1] == ':') {
+ isc_region_t r;
+ isc_buffer_usedregion(target, &r);
+ if (r.length > 0U && r.base[r.length - 1] == ':') {
if (isc_buffer_availablelength(target) == 0) {
return (ISC_R_NOSPACE);
}