summaryrefslogtreecommitdiff
path: root/security/nss/cmd/smimetools
diff options
context:
space:
mode:
authormcgreer%netscape.com <devnull@localhost>2000-10-05 01:39:35 +0000
committermcgreer%netscape.com <devnull@localhost>2000-10-05 01:39:35 +0000
commitc02ea9ecc568057b81139f43babd715584a49f59 (patch)
tree02d47b86c1694a82ba34649a3bb794277e3399b5 /security/nss/cmd/smimetools
parent08fb2d7f5ec6afd6af03a17d4d3eff617e528b8c (diff)
downloadnss-hg-c02ea9ecc568057b81139f43babd715584a49f59.tar.gz
fix for bug #55190. Some 64-bit platforms will not return an alloc'ed pointer from an undeclared function.
Diffstat (limited to 'security/nss/cmd/smimetools')
-rw-r--r--security/nss/cmd/smimetools/cmsutil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/nss/cmd/smimetools/cmsutil.c b/security/nss/cmd/smimetools/cmsutil.c
index 08d018b21..1d756675e 100644
--- a/security/nss/cmd/smimetools/cmsutil.c
+++ b/security/nss/cmd/smimetools/cmsutil.c
@@ -47,6 +47,7 @@
#include "secoid.h"
#include "cms.h"
#include "smime.h"
+#include "cmslocal.h"
#if defined(XP_UNIX)
#include <unistd.h>
@@ -524,7 +525,7 @@ enveloped_data(struct envelopeOptionsStr envelopeOptions)
}
/* XXX find the recipient's certs by email address or nickname */
if ((recipientcerts =
- (CERTCertificate **)NSS_CMSArray_Alloc(tmppoolp, cnt)) == NULL) {
+ (CERTCertificate **)NSS_CMSArray_Alloc(tmppoolp, cnt+1)) == NULL) {
fprintf(stderr, "ERROR: out of memory.\n");
goto loser;
}
@@ -772,7 +773,7 @@ signed_data_certsonly(struct certsonlyOptionsStr certsonlyOptions)
goto loser;
}
if ((certs =
- (CERTCertificate **)NSS_CMSArray_Alloc(tmppoolp, cnt)) == NULL) {
+ (CERTCertificate **)NSS_CMSArray_Alloc(tmppoolp, cnt+1)) == NULL) {
fprintf(stderr, "ERROR: out of memory.\n");
goto loser;
}