mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 07:22:08 -04:00
Fix an off-by-one error in catz_opt_cmp() function
This commit fixes an off-by-one error in catz_opt_cmp() function which was resulting in ignoring the last character of the compared string.
This commit is contained in:
parent
ae53919154
commit
ae9330b641
1 changed files with 4 additions and 3 deletions
|
|
@ -886,9 +886,10 @@ typedef enum {
|
|||
|
||||
static bool
|
||||
catz_opt_cmp(const dns_label_t *option, const char *opt) {
|
||||
unsigned int l = strlen(opt);
|
||||
if (option->length - 1 == l &&
|
||||
memcmp(opt, option->base + 1, l - 1) == 0) {
|
||||
size_t len = strlen(opt);
|
||||
|
||||
if (option->length - 1 == len &&
|
||||
memcmp(opt, option->base + 1, len) == 0) {
|
||||
return (true);
|
||||
} else {
|
||||
return (false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue