aboutsummaryrefslogtreecommitdiffstats
path: root/src/vu-single-colour.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-10 20:07:02 +0100
committerMattias Andrée <maandree@kth.se>2017-01-10 20:07:02 +0100
commit70158ed8bc74ce80a049c1beb71e85ae949778b2 (patch)
treebcabd2964e2b07bf2eaa0aab10cd6dbe313fa6a4 /src/vu-single-colour.c
parentAdd vu-transpose (diff)
downloadblind-70158ed8bc74ce80a049c1beb71e85ae949778b2.tar.gz
blind-70158ed8bc74ce80a049c1beb71e85ae949778b2.tar.bz2
blind-70158ed8bc74ce80a049c1beb71e85ae949778b2.tar.xz
Refuse infinite writes to regular files
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/vu-single-colour.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vu-single-colour.c b/src/vu-single-colour.c
index 911dd11..6148205 100644
--- a/src/vu-single-colour.c
+++ b/src/vu-single-colour.c
@@ -69,6 +69,9 @@ main(int argc, char *argv[])
if (!(argc & 1) && tolf(argv[argc - 1], &alpha))
eprintf("the alpha value must be a floating-point value\n");
+ if (inf)
+ einf_check_fd(STDOUT_FILENO, "<stdout>");
+
strcpy(stream.pixfmt, "xyza");
fprint_stream_head(stdout, &stream);
fflush(stdout);