summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2004-04-30 23:39:16 +0000
committercvs2hg <devnull@localhost>2004-04-30 23:39:16 +0000
commit17f270826aa3da11c517014d29feb4aa823bc470 (patch)
tree0e452aac52430136699dcf666245d9ca53b4fe63
parenteabc8258004c034e1aa7ed124d2dd33f458542ea (diff)
downloadnss-hg-FORMS_20040611_BASE.tar.gz
fixup commit for branch 'FORMS_20040611_BRANCH'MOZILLA_1_8a1_RELEASEFORMS_20040621_BASEFORMS_20040611_BASE
-rw-r--r--dbm/include/mcom_db.h10
-rw-r--r--security/nss/lib/nss/nss.h2
-rw-r--r--security/nss/lib/softoken/pk11db.c15
3 files changed, 19 insertions, 8 deletions
diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h
index 97e74260e..dcae849f2 100644
--- a/dbm/include/mcom_db.h
+++ b/dbm/include/mcom_db.h
@@ -190,7 +190,7 @@
#define LITTLE_ENDIAN 1234
#endif
-#if defined(_WINDOWS)
+#if defined(_WINDOWS) || defined(XP_OS2_VACPP)
#ifdef BYTE_ORDER
#undef BYTE_ORDER
#endif
@@ -222,6 +222,14 @@
#define MAXPATHLEN 1024
#endif
+#ifdef XP_OS2_VACPP
+#include <os2.h>
+#define MAXPATHLEN CCHMAXPATH
+#define EPERM EINVAL
+#define ENOTDIR EBADPOS
+#define S_ISDIR(s) ((s) & S_IFDIR)
+#endif
+
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
#ifndef STDERR_FILENO
diff --git a/security/nss/lib/nss/nss.h b/security/nss/lib/nss/nss.h
index d59454af2..2a4f6abd5 100644
--- a/security/nss/lib/nss/nss.h
+++ b/security/nss/lib/nss/nss.h
@@ -49,7 +49,7 @@ SEC_BEGIN_PROTOS
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
-#define NSS_VERSION "3.9.1 Beta 2"
+#define NSS_VERSION "3.9.1 Beta 3"
#define NSS_VMAJOR 3
#define NSS_VMINOR 9
#define NSS_VPATCH 1
diff --git a/security/nss/lib/softoken/pk11db.c b/security/nss/lib/softoken/pk11db.c
index d9d003fa1..b5ee79231 100644
--- a/security/nss/lib/softoken/pk11db.c
+++ b/security/nss/lib/softoken/pk11db.c
@@ -519,6 +519,7 @@ secmod_FreeSlotStrings(char **slotStrings, int count)
for (i=0; i < count; i++) {
if (slotStrings[i]) {
PR_smprintf_free(slotStrings[i]);
+ slotStrings[i] = NULL;
}
}
}
@@ -549,7 +550,7 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
unsigned long cipherOrder =PK11_DEFAULT_CIPHER_ORDER;
unsigned short len;
unsigned short namesOffset = 0; /* start of the names block */
- unsigned short namesRunningOffset; /* offset to name we are
+ unsigned long namesRunningOffset; /* offset to name we are
* currently processing */
unsigned short slotOffset;
PRBool isOldVersion = PR_FALSE;
@@ -570,7 +571,7 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
/* -------------------------------------------------------------
** Process the buffer header, which is the secmodData struct.
- ** It may be an old or new version. Check the length fo each.
+ ** It may be an old or new version. Check the length for each.
*/
CHECK_SIZE( offsetof(secmodData, trustOrder[0]) );
@@ -669,7 +670,7 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
}
/*
- * Consistancy check: Make sure the slot and names blocks don't
+ * Consistency check: Make sure the slot and names blocks don't
* overlap. These blocks can occur in any order, so this check is made
* in 2 parts. First we check the case where the slot block starts
* after the name block. Later, when we have the slot block length,
@@ -697,7 +698,7 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
slotCount = SECMOD_GETSHORT((unsigned char *)data->data + slotOffset);
/*
- * Consistancy check: Part2. We now have the slot block length, we can
+ * Consistency check: Part 2. We now have the slot block length, we can
* check the case where the slotblock procedes the name block.
*/
if (slotOffset < namesOffset) { /* slot block starts before name block */
@@ -711,6 +712,8 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
/* slotCount; */
slotStrings = (char **)PORT_ArenaZAlloc(arena, slotCount * sizeof(char *));
+ if (slotStrings == NULL)
+ goto loser;
for (i=0; i < (int) slotCount; i++, slots++) {
PRBool hasRootCerts =PR_FALSE;
PRBool hasRootTrust =PR_FALSE;
@@ -740,8 +743,8 @@ secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
isModuleDBOnly, internal, trustOrder, cipherOrder,
ssl0, ssl1);
secmod_FreeSlotStrings(slotStrings,slotCount);
- if (nss == NULL)
- goto loser;
+ /* it's permissible (and normal) for nss to be NULL. it simply means
+ * there are no NSS specific parameters in the database */
moduleSpec = pk11_mkNewModuleSpec(dllName,commonName,parameters,nss);
PR_smprintf_free(nss);
PORT_FreeArena(arena,PR_TRUE);