aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-04-04 15:45:42 -0400
committerJack Lloyd <[email protected]>2017-04-04 15:45:42 -0400
commit92f3ff5e27f6736d8a498e0d3144255c4ba37c8d (patch)
treec61436699e5afb8de2e8c3b7874c2040ec195263 /src/lib/utils
parentd4c3f6a3409ce0ad6520c13813310f6cb523fe6f (diff)
Fix X509 DN comparisons
CVE-2017-2801
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/parsing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/utils/parsing.cpp b/src/lib/utils/parsing.cpp
index 8fd2ccc52..cd0c2409e 100644
--- a/src/lib/utils/parsing.cpp
+++ b/src/lib/utils/parsing.cpp
@@ -239,6 +239,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))