]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: make optional argument more robust
authorKarel Zak <kzak@redhat.com>
Wed, 3 Apr 2019 14:36:43 +0000 (16:36 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Oct 2019 11:11:53 +0000 (13:11 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/script.c

index 7bf4a5e46a171484396413cb9448c28cb602be61..375cdfc7b3306673070e4f8bd077908a395b4ff0 100644 (file)
@@ -934,6 +934,8 @@ int main(int argc, char **argv)
                        ctl.quiet = 1;
                        break;
                case 't':
+                       if (optarg && *optarg == '=')
+                               optarg++;
                        log_associate(&ctl, &ctl.out,
                                optarg ? optarg : "/dev/stderr",
                                SCRIPT_FMT_TIMING_SIMPLE);