projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a888bad
)
Fix for coverity (bail if we can't stat the file in detail_recv)
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 17:17:26 +0000
(12:17 -0500)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 17:17:37 +0000
(12:17 -0500)
src/main/detail.c
patch
|
blob
|
history
diff --git
a/src/main/detail.c
b/src/main/detail.c
index
2bee7a1
..
1b995cf
100644
(file)
--- a/
src/main/detail.c
+++ b/
src/main/detail.c
@@
-382,7
+382,14
@@
int detail_recv(rad_listen_t *listener)
{
struct stat buf;
- fstat(listener->fd, &buf);
+ if (fstat(listener->fd, &buf) < 0) {
+ radlog(L_ERR, "Failed to stat "
+ "detail file %s: %s",
+ data->filename,
+ strerror(errno));
+
+ goto cleanup;
+ }
if (((off_t) ftell(data->fp)) == buf.st_size) {
goto cleanup;
}