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

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