[asterisk-commits] kharwell: branch certified-11.2 r398001 - in /certified/branches/11.2: ./ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 30 10:26:58 CDT 2013
Author: kharwell
Date: Fri Aug 30 10:26:56 2013
New Revision: 398001
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398001
Log:
Check return value on fwrite
........
Merged revisions 398000 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
certified/branches/11.2/ (props changed)
certified/branches/11.2/main/asterisk.c
Propchange: certified/branches/11.2/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: certified/branches/11.2/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.2/main/asterisk.c?view=diff&rev=398001&r1=398000&r2=398001
==============================================================================
--- certified/branches/11.2/main/asterisk.c (original)
+++ certified/branches/11.2/main/asterisk.c Fri Aug 30 10:26:56 2013
@@ -1950,7 +1950,7 @@
char prefix[80];
const char *c = s;
- int res = 0;
+ int num, res = 0;
do {
if (VERBOSE_HASMAGIC(s)) {
@@ -1988,7 +1988,10 @@
fputs(prefix, stdout);
}
- fwrite(c, sizeof(char), s - c, stdout);
+ num = s - c;
+ if (fwrite(c, sizeof(char), num, stdout) < num) {
+ break;
+ }
if (!res) {
/* if at least some info has been written
More information about the asterisk-commits
mailing list