diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-03-17 21:53:31 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-03-17 21:53:31 +0100 |
commit | 54ee872149495524a73deef6e98022887f7e3d6f (patch) | |
tree | 90a28dd56412a545b480d0a2b1ccf520c1517257 | |
parent | d4071f8f94856c13de826af77e98375e015c7e1f (diff) | |
download | fdk-aac-54ee872149495524a73deef6e98022887f7e3d6f.tar.gz fdk-aac-54ee872149495524a73deef6e98022887f7e3d6f.tar.bz2 fdk-aac-54ee872149495524a73deef6e98022887f7e3d6f.zip |
Verify that output file can be opened
-rw-r--r-- | src/mot-encoder.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mot-encoder.c b/src/mot-encoder.c index 1fdc58e..e0ba57c 100644 --- a/src/mot-encoder.c +++ b/src/mot-encoder.c @@ -191,6 +191,10 @@ int main(int argc, char *argv[]) } int output_fd = open(output, O_WRONLY); + if (output_fd == -1) { + perror("Failed to open output"); + return 3; + } MagickWandGenesis(); |