From e3bf0236f1901730a2d4e507741a561fca203e73 Mon Sep 17 00:00:00 2001 From: Elio Maldonado Date: Fri, 18 Dec 2009 09:23:47 +0000 Subject: [PATCH] Fix segmentation fault when listing keys or certs in the database - rhbz #540387 --- 540387.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 540387.patch diff --git a/540387.patch b/540387.patch new file mode 100644 index 0000000..6133526 --- /dev/null +++ b/540387.patch @@ -0,0 +1,17 @@ +diff --git a/mozilla/security/nss/lib/pk11wrap/pk11pars.c b/mozilla/security/nss/lib/pk11wrap/pk11pars.c +index c36cd25..5855084 100644 +--- a/mozilla/security/nss/lib/pk11wrap/pk11pars.c ++++ b/mozilla/security/nss/lib/pk11wrap/pk11pars.c +@@ -1134,6 +1134,12 @@ SECMOD_LoadModule(char *modulespec,SECMODModule *parent, PRBool recurse) + + for (; *index; index++) { + SECMODModule *child; ++ if (0 == PORT_Strcmp(*index, modulespec)) { ++ /* avoid trivial infinite recursion */ ++ PORT_SetError(SEC_ERROR_NO_MODULE); ++ rv = SECFailure; ++ break; ++ } + child = SECMOD_LoadModule(*index,module,PR_TRUE); + if (!child) break; + if (child->isCritical && !child->loaded) {