Validate variables names when using named arguments for functions

darcs-hash:20070422211624-ac50b-11920a8a00c7bae97c3556bc7ce47b3022c34f08.gz
This commit is contained in:
axel 2007-04-23 07:16:24 +10:00
parent 7ca76ef743
commit c5805cfd47

View file

@ -1364,6 +1364,16 @@ static int builtin_function( wchar_t **argv )
{
while( woptind < argc )
{
if( wcsvarname( argv[woptind] ) )
{
sb_printf( sb_err,
_( L"%ls: Invalid variable name '%ls'\n" ),
argv[0],
argv[woptind] );
res = STATUS_BUILTIN_ERROR;
break;
}
al_push( named_arguments, halloc_wcsdup( current_block, argv[woptind++] ) );
}
}