Merge branch '1682-dighost-c-idn_output_filter-has-off-by-one-error' into 'master'

Resolve "dighost.c: idn_output_filter has off by one error"

Closes #1682

See merge request isc-projects/bind9!3243
This commit is contained in:
Mark Andrews 2020-03-17 04:43:46 +00:00
commit 6052e254b9

View file

@ -4420,7 +4420,7 @@ idn_output_filter(isc_buffer_t *buffer, unsigned int used_org) {
* Copy name from 'buffer' to 'src' and terminate it with NULL.
*/
srclen = isc_buffer_usedlength(buffer) - used_org;
if (srclen > sizeof(src)) {
if (srclen >= sizeof(src)) {
warn("Input name too long to perform IDN conversion");
return (ISC_R_SUCCESS);
}