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

502083
diff --git a/src/cmd/ksh93/sh/name.c b/src/cmd/ksh93/sh/name.c
502083
--- a/src/cmd/ksh93/sh/name.c
502083
+++ b/src/cmd/ksh93/sh/name.c
502083
@@ -1425,7 +1425,7 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
502083
 	{
502083
 		if(xp->root!=root)
502083
 			continue;
502083
-		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]=='+'))
502083
+		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]=='+'))
502083
 		{
502083
 			sh_stats(STAT_NVHITS);
502083
 			np = xp->np;