Skip to content

Commit

Permalink
Apply Solaris patch 065-CR7110983
Browse files Browse the repository at this point in the history
This change is pulled from here:
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/065-CR7110983.patch

Unfortunately there is no publicly available documentation on what
it does. We just have to assume the Solaris people knew what they
were doing. It looks like this fixes a memory leak in nv_putval().

This patch was also applied by ksh2020:
att@0563864
  • Loading branch information
McDutchie committed Jan 8, 2021
1 parent 222515b commit e20db01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/ksh93/sh/name.c
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,10 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
else
{
if(size==0 && nv_isattr(np,NV_HOST)!=NV_HOST &&nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
{
nv_setsize(np,size=dot);
tofree = up->cp;
}
else if(size > dot)
dot = size;
else if(nv_isattr(np,NV_LJUST|NV_RJUST)==NV_LJUST && dot>size)
Expand Down

0 comments on commit e20db01

Please sign in to comment.