aboutsummaryrefslogtreecommitdiffstats
path: root/cqrlogo.c
diff options
context:
space:
mode:
Diffstat (limited to 'cqrlogo.c')
-rw-r--r--cqrlogo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index d3a9541..6153cb7 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -104,7 +104,10 @@ int main(int argc, char **argv) {
}
/* write PNG data to stdout */
- fwrite(png->buffer, png->size, 1, stdout);
+ if (fwrite(png->buffer, png->size, 1, stdout) != 1) {
+ fprintf(stderr, "Failed writing PNG data to stdout.\n");
+ return EXIT_FAILURE;
+ }
/* free memory we no longer need */
if (uri_server_name)