Ignore:
Timestamp:
Sep 10, 2020, 10:47:45 PM (5 years ago)
Author:
bird
Message:

kash: fixed a couple of alloctions when setting up subshells. Must pass redir to openhere_child.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/options.c

    r3438 r3445  
    132132    psh->shellparam.nparam = left = inherit->shellparam.nparam;
    133133    assert(left >= 0);
    134     psh->shellparam.p = (char **)ckmalloc(psh, left + 1);
     134    psh->shellparam.p = (char **)ckmalloc(psh, (left + 1) * sizeof(psh->shellparam.p[0]));
    135135    psh->shellparam.p[left] = NULL;
    136136    while (left-- > 0) {
Note: See TracChangeset for help on using the changeset viewer.