1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-10 00:19:02 +00:00

Avoid assertion failure in the case of R=N|Y. Fixes #2710.

This commit is contained in:
dmiller
2023-11-02 19:09:54 +00:00
parent 6959060fe6
commit 855d4ef3a2

View File

@@ -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]));