Skip to content

Commit ad9ea0b

Browse files
committed
Fix off-by-one in nv_mktype() (Solaris patch 210-Bug15993811)
This change is pulled from here: https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/210-Bug15993811.patch Unfortunately there is no publicly available documentation on why this change was needed. We just have to assume the Solaris people knew what they were doing. ksh2020 upstreamed this too (as well as all the other Solaris patches applied here).
1 parent ba4989d commit ad9ea0b

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎src/cmd/ksh93/sh/nvtype.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,6 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
904904
}
905905
offset = roundof(offset,sizeof(char*));
906906
nv_setsize(mp,offset);
907-
if(nd)
908-
nd++;
909907
k = roundof(sizeof(Namtype_t),sizeof(Sfdouble_t)) - sizeof(Namtype_t);
910908
pp = newof(NiL, Namtype_t, 1, nnodes*NV_MINSZ + offset + size + (nnodes+nd)*sizeof(char*) + iref*sizeof(struct Namref)+k);
911909
pp->fun.dsize = sizeof(Namtype_t)+nnodes*NV_MINSZ +offset+k;

0 commit comments

Comments
 (0)