botan/botan-1.8.15-fix-x509-dn-cm...

14 lines
455 B
Diff

diff --git a/src/utils/parsing.cpp b/src/utils/parsing.cpp
index bdb9e79..3f56d12 100644
--- a/src/utils/parsing.cpp
+++ b/src/utils/parsing.cpp
@@ -227,6 +227,8 @@ bool x500_name_cmp(const std::string& name1, const std::string& name2)
if(p1 == name1.end() && p2 == name2.end())
return true;
+ if(p1 == name1.end() || p2 == name2.end())
+ return false;
}
if(!Charset::caseless_cmp(*p1, *p2))