summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2002-01-29 21:12:13 +0000
committerrelyea%netscape.com <devnull@localhost>2002-01-29 21:12:13 +0000
commit7d4803200198aa81672f565ec4e4b785c215ed9d (patch)
tree2101263a0562b11f64439825b657f86c2f1d6cc5
parent536c9904f352e0c30fc324ad671827b0e36f77fd (diff)
downloadnss-hg-7d4803200198aa81672f565ec4e4b785c215ed9d.tar.gz
Built-ins set the ulValueLen to -1 to indicate an unknown attribute type.
-rw-r--r--security/nss/lib/dev/ckhelper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/nss/lib/dev/ckhelper.c b/security/nss/lib/dev/ckhelper.c
index f15f5f983..6daf808ac 100644
--- a/security/nss/lib/dev/ckhelper.c
+++ b/security/nss/lib/dev/ckhelper.c
@@ -138,6 +138,10 @@ nssCKObject_GetAttributes
for (i=0; i<count; i++) {
CK_ULONG ulValueLen = obj_template[i].ulValueLen;
if (ulValueLen == 0) continue;
+ if (ulValueLen < 0) {
+ obj_template[i].ulValueLen = 0;
+ continue;
+ }
if (is_string_attribute(obj_template[i].type)) {
ulValueLen++;
}