validate cli input as UTF-8

This commit is contained in:
IgnorantGuru 2012-06-28 16:08:56 -06:00
parent a4a3427b07
commit 4dcabb2a8d
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
0.2.8+
users can mount/umount tmpfs and ramfs if in allowed_types; updated conf
conf allow option sync for nfs; remove noatime,utf8 for smbfs/cifs #3
0.2.8
0.2.8 2012-06-15:
ssh:// support
use cifs by default instead of smbfs
fix denied when passing mount option uid= on command line

View File

@ -4227,6 +4227,13 @@ printf("\n-----------------------\n");
else
arg_next = NULL;
if ( ( arg && !g_utf8_validate( arg, -1, NULL ) ) ||
( arg_next && !g_utf8_validate( arg_next, -1, NULL ) ) )
{
wlog( "udevil: error: argument is not valid UTF-8\n", NULL, 2 );
goto _exit;
}
switch ( data->cmd_type )
{
case CMD_UNSET: