Bugzilla Bug 338798: in C89, local struct variables can only be initialized

by constant expressions.  HP C compiler version B.11.11.08 generates
incorrect code silently if the initializers are non-constant expressions.
r=alexei.volkov,julien.pierre.
Modified files: cmd/crmftest/testcrmf.c lib/ssl/ssl3con.c
This commit is contained in:
wtchang%redhat.com 2006-06-26 23:32:19 +00:00
Родитель 1ce6ee2a89
Коммит 11a41b2806
2 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -371,9 +371,14 @@ CreateCertRequest(TESTKeyPair *pair, long inRequestID)
SECStatus rv;
CRMFValidityCreationInfo validity;
unsigned char UIDbuf[UID_BITS / BPB];
SECItem issuerUID = { siBuffer, UIDbuf, UID_BITS };
SECItem subjectUID = { siBuffer, UIDbuf, UID_BITS };
/* len in bits */
SECItem issuerUID = { siBuffer, NULL, 0 };
SECItem subjectUID = { siBuffer, NULL, 0 };
/* len in bits */
issuerUID.data = UIDbuf;
issuerUID.len = UID_BITS;
subjectUID.data = UIDbuf;
subjectUID.len = UID_BITS;
pair->certReq = NULL;
certReq = CRMF_CreateCertRequest(inRequestID);

Просмотреть файл

@ -39,7 +39,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: ssl3con.c,v 1.91 2006-05-31 23:54:52 wtchang%redhat.com Exp $ */
/* $Id: ssl3con.c,v 1.92 2006-06-26 23:32:19 wtchang%redhat.com Exp $ */
#include "nssrenam.h"
#include "cert.h"
@ -6409,13 +6409,15 @@ ssl3_HandleRSAClientKeyExchange(sslSocket *ss,
SECStatus rv;
SECItem enc_pms;
unsigned char rsaPmsBuf[SSL3_RSA_PMS_LENGTH];
SECItem pmsItem = {siBuffer, rsaPmsBuf, sizeof rsaPmsBuf};
SECItem pmsItem = {siBuffer, NULL, 0};
PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
enc_pms.data = b;
enc_pms.len = length;
pmsItem.data = rsaPmsBuf;
pmsItem.len = sizeof rsaPmsBuf;
if (ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0) { /* isTLS */
PRInt32 kLen;