projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74fa957
)
teamspeak2: fix potential use after close
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:09:28 +0000
(19:09 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 07:41:03 +0000
(08:41 +0100)
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
src/teamspeak2.c
patch
|
blob
|
history
diff --git
a/src/teamspeak2.c
b/src/teamspeak2.c
index
2552ad3
..
c8bf483
100644
(file)
--- a/
src/teamspeak2.c
+++ b/
src/teamspeak2.c
@@
-258,6
+258,7
@@
static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh)
WARNING ("teamspeak2 plugin: connect failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
close (sd);
+ sd = -1;
continue;
}