[asterisk-commits] kharwell: trunk r398003 - in /trunk: ./ main/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 30 10:39:11 CDT 2013
Author: kharwell
Date: Fri Aug 30 10:39:09 2013
New Revision: 398003
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398003
Log:
Check return value on fwrite
........
Merged revisions 398000 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398002 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Aug 30 10:39:09 2013
@@ -1,1 +1,1 @@
-/branches/12:1-397989
+/branches/12:1-397989,398002
Modified: trunk/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/asterisk.c?view=diff&rev=398003&r1=398002&r2=398003
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Fri Aug 30 10:39:09 2013
@@ -2089,7 +2089,7 @@
char prefix[80];
const char *c = s;
- int res = 0;
+ int num, res = 0;
do {
if (VERBOSE_HASMAGIC(s)) {
@@ -2127,7 +2127,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