dest = (void **)PORT_ArenaGrow (poolp,
*array,
(n + 1) * sizeof(void *),
dest = (void **)PORT_ArenaGrow (poolp,
*array,
(n + 1) * sizeof(void *),
{
int n, i, limit, lastxchg;
void *tmp;
{
int n, i, limit, lastxchg;
void *tmp;
n = SecCmsArrayCount(primary);
PORT_Assert(secondary == NULL || SecCmsArrayCount(secondary) == n);
PORT_Assert(tertiary == NULL || SecCmsArrayCount(tertiary) == n);
n = SecCmsArrayCount(primary);
PORT_Assert(secondary == NULL || SecCmsArrayCount(secondary) == n);
PORT_Assert(tertiary == NULL || SecCmsArrayCount(tertiary) == n);
- if (secondary) { /* secondary array? */
- tmp = secondary[i+1]; /* exchange there as well */
+ if (secondary && ((i+1)<n_2nd)) {/* secondary array? */
+ tmp = secondary[i+1]; /* exchange there as well */