diff --git a/builtin_set.c b/builtin_set.c index 3646d0d79..e21048dd2 100644 --- a/builtin_set.c +++ b/builtin_set.c @@ -435,6 +435,13 @@ int builtin_set( wchar_t **argv ) { dest = wcsdup(argv[woptind++]); //fwprintf(stderr, L"Dest: %ls\n", dest); + + if( !wcslen( dest ) ) + { + free( dest ); + sb_printf( sb_err, L"%ls: Variable name must not be zero\n", argv[0] ); + return 1; + } } /* Parse values */