Blame SOURCES/ksh-20120801-nv_open-memcmp.patch

34cce0
diff --git a/src/cmd/ksh93/sh/name.c b/src/cmd/ksh93/sh/name.c
34cce0
--- a/src/cmd/ksh93/sh/name.c
34cce0
+++ b/src/cmd/ksh93/sh/name.c
34cce0
@@ -1425,7 +1425,7 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
34cce0
 	{
34cce0
 		if(xp->root!=root)
34cce0
 			continue;
34cce0
-		if(*name==*xp->name && xp->namespace==shp->namespace && (flags&(NV_ARRAY|NV_NOSCOPE))==xp->flags && memcmp(xp->name,name,xp->len)==0 && (name[xp->len]==0 || name[xp->len]=='=' || name[xp->len]=='+'))
34cce0
+		if(*name==*xp->name && xp->namespace==shp->namespace && (flags&(NV_ARRAY|NV_NOSCOPE))==xp->flags && strncmp(xp->name,name,xp->len)==0 && (name[xp->len]==0 || name[xp->len]=='=' || name[xp->len]=='+'))
34cce0
 		{
34cce0
 			sh_stats(STAT_NVHITS);
34cce0
 			np = xp->np;