0.96
aCaB 15 years ago
parent fcbfb1c6ee
commit 1ca7d19031
  1. 5
      ChangeLog
  2. 14
      clamav-milter/netcode.c

@ -1,3 +1,8 @@
Fri Sep 10 10:52:45 CEST 2010 (acab)
------------------------------------
* clamav-milter/netcode.c: fix error path fd leak when connection succeeds
but ping fails (bb#2259)
Thu Sep 9 12:30:34 EEST 2010 (edwin) Thu Sep 9 12:30:34 EEST 2010 (edwin)
------------------------------------- -------------------------------------
* libclamav/bytecode.c: properly skip bytecodes with long lines. * libclamav/bytecode.c: properly skip bytecodes with long lines.

@ -293,12 +293,16 @@ void nc_ping_entry(struct CP_ENTRY *cpe) {
int s = nc_connect_entry(cpe); int s = nc_connect_entry(cpe);
char *reply; char *reply;
if(s>=0 && !nc_send(s, "nPING\n", 6) && (reply = nc_recv(s))) { if(s>=0) {
cpe->dead = strcmp(reply, "PONG\n")!=0; if(!nc_send(s, "nPING\n", 6) && (reply = nc_recv(s))) {
free(reply); cpe->dead = strcmp(reply, "PONG\n")!=0;
free(reply);
close(s);
return;
}
close(s); close(s);
} else cpe->dead = 1; }
return; cpe->dead = 1;
} }

Loading…
Cancel
Save