diff options
| author | Simon Tatham <anakin@pobox.com> | 2008-12-12 19:49:05 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2008-12-12 19:49:05 +0000 |
| commit | 17334d19452b8818865c31bf2e42d2cf334c1f02 (patch) | |
| tree | ca927e1117b5181ac384ea1444f34668024aaf61 | |
| parent | ba08d8ab28cb26cf3f743acf0e9c9df13bbb5d3e (diff) | |
| download | puzzles-17334d19452b8818865c31bf2e42d2cf334c1f02.zip puzzles-17334d19452b8818865c31bf2e42d2cf334c1f02.tar.gz puzzles-17334d19452b8818865c31bf2e42d2cf334c1f02.tar.bz2 puzzles-17334d19452b8818865c31bf2e42d2cf334c1f02.tar.xz | |
Don't ignore the return code of fwrite(). (Slight modification of a
patch from Phil Bordelon.)
[originally from svn r8373]
| -rw-r--r-- | obfusc.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -114,7 +114,11 @@ int main(int argc, char **argv) obfuscate_bitmap(data, datalen * 8, decode); if (outputmode == BINARY) { - fwrite(data, 1, datalen, stdout); + int ret = fwrite(data, 1, datalen, stdout); + if (ret < 0) { + fprintf(stderr, "obfusc: write: %s\n", strerror(errno)); + return 1; + } } else { int i; for (i = 0; i < datalen; i++) |