From 855d4ef3a2152dc540b64ffd083e6fe5a6611035 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 2 Nov 2023 19:09:54 +0000 Subject: [PATCH] Avoid assertion failure in the case of R=N|Y. Fixes #2710. --- osscan.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osscan.cc b/osscan.cc index 6c22d4ab0..52831c979 100644 --- a/osscan.cc +++ b/osscan.cc @@ -678,8 +678,13 @@ bool FingerTest::str2AVal(const char *str, const char *end) { } if (def->hasR) { if (maxIdx > 0) { - assert(AVs[0] == NULL || 0 == strcmp("Y", AVs[0])); - AVs[0] = "Y"; + if (AVs[0] == NULL) { + AVs[0] = "Y"; + } + else if (!strchr(AVs[0], 'Y')) { + error("Test with AVals missing R=Y (R=%s)", AVs[0]); + return false; + } } else { assert(AVs[0] == NULL || 0 == strcmp("N", AVs[0]));