column: segmentation fault on invalid unicode input passed to -s option
The function mbs_to_wcs() returns NULL on invalid UTF. Fixes: https://github.com/karelzak/util-linux/issues/1425 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
4693a1bba9
commit
9714331843
|
@ -814,6 +814,8 @@ int main(int argc, char **argv)
|
|||
case 's':
|
||||
free(ctl.input_separator);
|
||||
ctl.input_separator = mbs_to_wcs(optarg);
|
||||
if (!ctl.input_separator)
|
||||
err(EXIT_FAILURE, _("failed to use input separator"));
|
||||
ctl.greedy = 0;
|
||||
break;
|
||||
case 'T':
|
||||
|
|
Loading…
Reference in New Issue