forked from Cisco-Talos/clamav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better error checking/reporting (bb#657)
git-svn: trunk@3273
- Loading branch information
Tomasz Kojm
committed
Oct 5, 2007
1 parent
e6fe106
commit 38fe8af
Showing
5 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,7 +171,11 @@ int filecopy(const char *src, const char *dest) | |
} | ||
|
||
while((bytes = read(s, buffer, FILEBUFF)) > 0) | ||
write(d, buffer, bytes); | ||
if(write(d, buffer, bytes) < bytes) { | ||
close(s); | ||
close(d); | ||
return -1; | ||
} | ||
|
||
close(s); | ||
/* [email protected]: check result of close for NFS file */ | ||
|