shithub: scc

Download patch

ref: 8e3349f339229d95aafe5f66ef46a9829d79ea46
parent: 2c40b548c9cbc85e2005eb343ae96d94334fbebf
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Nov 28 04:29:40 EST 2017

[objdump] Add fclose() check to stdout

We have to check if the output is correctly written or there is
some kind of problem with the output stream.

--- a/objdump/main.c
+++ b/objdump/main.c
@@ -255,5 +255,8 @@
 		dump(*argv);
 	}
 
+	if (fclose(stdout) == EOF)
+		die("objdump: stdout: %s", strerror(errno));
+
 	return 0;
 }