summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-23 05:21:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-23 05:21:10 +0000
commit624d9eb33c34996887d6c14178ba86818e5897f0 (patch)
tree127fc1bb3e3144b6b95046433161041f0e2564a4 /src
parentAdding upstream version 2.11.1. (diff)
downloaddnsperf-624d9eb33c34996887d6c14178ba86818e5897f0.tar.xz
dnsperf-624d9eb33c34996887d6c14178ba86818e5897f0.zip
Adding upstream version 2.11.2.upstream/2.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/opt.c4
-rwxr-xr-xsrc/test/test1.sh2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/opt.c b/src/opt.c
index bd0bc52..cd312ad 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -239,9 +239,9 @@ static int perf_opt_long_parse(char* optarg)
char* arg;
if ((arg = strchr(optarg, '='))) {
+ optlen = arg - optarg;
arg++;
- optlen = strlen(arg);
- if (optlen < 1) {
+ if (optlen < 1 || !strlen(arg)) {
return -1;
}
} else {
diff --git a/src/test/test1.sh b/src/test/test1.sh
index a289c99..a2944d4 100755
--- a/src/test/test1.sh
+++ b/src/test/test1.sh
@@ -10,3 +10,5 @@
# test for broken long opt in v2.11.0
../dnsperf -O suppress=test 2>&1 |grep -q "unknown message type to suppress: test"
+# ...and in v2.11.1, issue #234
+../dnsperf -O doh-uri=https://blahblah.com/dns-query -O suppress=timeouts -h \ No newline at end of file