# Solaris specific issue. Not submitted to the community.
--- a/src/cmd/ksh93/sh/path.c 2015-02-24 13:25:19.360898415 -0800
+++ b/src/cmd/ksh93/sh/path.c 2015-02-25 00:54:42.168155178 -0800
@@ -1463,7 +1463,7 @@
len = strlen(name);
for(pp=first; pp; pp=pp->next)
{
- if(len == pp->len && memcmp(name,pp->name,len)==0)
+ if(len == pp->len && strncmp(name,pp->name,len)==0)
{
pp->flags |= flag;
return(first);
@@ -1751,7 +1751,7 @@
register Pathcomp_t *pp=first;
while(pp)
{
- if(memcmp(name,pp->name,pp->len)==0 && name[pp->len]==c)
+ if(strncmp(name,pp->name,pp->len)==0 && name[pp->len]==c)
return(pp);
pp = pp->next;
}
--- a/src/cmd/ksh93/sh/nvtree.c Sun Jan 2 17:45:14 2011
+++ b/src/cmd/ksh93/sh/nvtree.c Fri Jul 22 00:30:31 2011
@@ -26,6 +26,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
#include "defs.h"
#include "name.h"
@@ -188,7 +191,7 @@
{
char *cp = nv_name(dp->hp);
c = strlen(cp);
- if(memcmp(name,cp,c) || name[c]!='[')
+ if(strncmp(name,cp,c) || name[c]!='[')
dp->hp = (Namval_t*)dtnext(dp->root,dp->hp);
else
{
@@ -266,7 +269,7 @@
{
if(dp->nextnode)
return((*dp->nextnode)(dp->hp,dp->root,dp->fun));
- if(dp->len && memcmp(dp->data, dp->hp->nvname, dp->len))
+ if(dp->len && strncmp(dp->data, dp->hp->nvname, dp->len))
return(0);
return((Namval_t*)dtnext(dp->root,dp->hp));
}
@@ -311,7 +314,7 @@
dp->hp = (*dp->nextnode)(np,(Dt_t*)0,dp->fun);
}
sh.last_table = last_table;
- if(!dp->len || memcmp(cp,dp->data,dp->len)==0)
+ if(!dp->len || strncmp(cp,dp->data,dp->len)==0)
{
if((nfp=nextdisc(np)) && (nfp->disc->getval||nfp->disc->getnum) && nv_isvtree(np) && strcmp(cp,dp->data))
nfp = 0;
@@ -861,7 +864,7 @@
continue;
break;
}
- else if(outfile && !wp->nofollow && argv[1] && memcmp(arg,argv[1],l=strlen(arg))==0 && argv[1][l]=='[')
+ else if(outfile && !wp->nofollow && argv[1] && strncmp(arg,argv[1],l=strlen(arg))==0 && argv[1][l]=='[')
{
int k=1;
Namarr_t *ap=0;