diff --git a/src/cmd/ksh93/sh/name.c b/src/cmd/ksh93/sh/name.c index 5866ea3393db..1b77537003b4 100644 --- a/src/cmd/ksh93/sh/name.c +++ b/src/cmd/ksh93/sh/name.c @@ -2113,7 +2113,7 @@ static void attstore(register Namval_t *np, void *data) if((flag&(NV_UTOL|NV_LTOU|NV_INTEGER)) == (NV_UTOL|NV_LTOU)) { data = (void*)nv_mapchar(np,0); - if(strcmp(data,e_tolower) && strcmp(data,e_toupper)) + if(data && strcmp(data,e_tolower) && strcmp(data,e_toupper)) return; } flag &= (NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER);