- Timestamp:
- Sep 10, 2020, 10:47:45 PM (5 years ago)
- Location:
- trunk/src/kash
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/options.c
r3438 r3445 132 132 psh->shellparam.nparam = left = inherit->shellparam.nparam; 133 133 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])); 135 135 psh->shellparam.p[left] = NULL; 136 136 while (left-- > 0) { -
trunk/src/kash/redir.c
r3442 r3445 104 104 do 105 105 { 106 struct redirtab *dst = ckmalloc(psh, sizeof( dst));106 struct redirtab *dst = ckmalloc(psh, sizeof(*dst)); 107 107 memcpy(dst->renamed, src->renamed, sizeof(dst->renamed)); 108 108 *dstp = dst; … … 314 314 args.pip[1] = pip[1]; 315 315 args.len = len; 316 forkshell2(psh, (struct job *)NULL, (union node *)NULL,316 forkshell2(psh, (struct job *)NULL, redir, 317 317 FORK_NOJOB | FORK_JUST_IO, 318 318 openhere_child, redir, &args, sizeof(args), NULL);
Note:
See TracChangeset
for help on using the changeset viewer.