mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
dig and mdig failed to properly preparse dash value pairs when value was a seperate argument and started with a dash.
This commit is contained in:
@@ -1859,6 +1859,20 @@ preparse_args(int argc, char **argv) {
|
||||
}
|
||||
option = &option[1];
|
||||
}
|
||||
if (strlen(option) == 0U) {
|
||||
continue;
|
||||
}
|
||||
/* Look for dash value option. */
|
||||
if (strpbrk(option, dash_opts) != &option[0] ||
|
||||
strlen(option) > 1U) {
|
||||
/* Error or value in option. */
|
||||
continue;
|
||||
}
|
||||
/* Dash value is next argument so we need to skip it. */
|
||||
rc--, rv++;
|
||||
/* Handle missing argument */
|
||||
if (rc == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user