]> git.ipfire.org Git - thirdparty/util-linux.git/commit
script: avoid trying fclose(NULL)
authorSami Kerola <kerolasa@iki.fi>
Sat, 16 Apr 2016 16:43:01 +0000 (17:43 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jun 2016 09:15:48 +0000 (11:15 +0200)
commit06aa13858b6a0f8b6f534c25c26eb594cb30dd15
treeecedd0ff37fbb7ebb34befb72fb9ceb1ee6ca74e
parentd92ee41b9f390bc8b1167bbb2880b923e76be99b
script: avoid trying fclose(NULL)

Here is a one-liner to reproduce the issue.

$ mkdir example && cd example && chmod 0500 . && script
Script started, file is typescript
script: cannot open typescript: Permission denied
                                                 Script done, file is typescript
Segmentation fault (core dumped)

Addresses: https://bugs.launchpad.net/bugs/1537518
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
term-utils/script.c