1 comment:
start = strtoul(argv[optind], &endptr, 0);
if (errno == ERANGE || errno == EINVAL || *endptr != '\0') {
msg_gerr("Error: value \"%s\" invalid\n", argv[optind]);
ret = 1;
goto out_shutdown;
}
len = strtoul(argv[optind + 1], &endptr, 0);
if (errno == ERANGE || errno == EINVAL || *endptr != '\0') {
msg_gerr("Error: value \"%s\" invalid\n", argv[optind + 1]);
I think we should avoid using `argv[optind]` and `argv[optind + 1]` to get the values here. […]
Yikes... Yeah, this is pretty suspicious. This would be a good time to change the syntax to "--wp-range start,len" if desired, however if that will break a lot of tools that use --wp-range then the first suggestion seems fine too (read the tokens in the OPTION_WP_SET_RANGE case and set optind as needed).
To view, visit change 40325. To unsubscribe, or for help writing mail filters, visit settings.