clamdscan: fix parsing of virus names in extended mode (bb#2311)

0.96
Tomasz Kojm 15 years ago
parent 88700e89bf
commit bdf542401c
  1. 4
      ChangeLog
  2. 13
      clamdscan/proto.c

@ -1,3 +1,7 @@
Mon Oct 11 13:49:29 CEST 2010 (tk)
----------------------------------
* clamdscan: fix parsing of virus names in extended mode (bb#2311)
Fri Oct 8 15:38:56 CEST 2010 (tk)
----------------------------------
* clamscan/manager.c: return errors for stdin scan failures (bb#2317)

@ -316,11 +316,12 @@ int dsresult(int sockd, int scantype, const char *filename, int *printok, int *e
if(len > 7) {
char *colon = strrchr(bol, ':');
if(colon && colon[1] != ' ') {
char *colon2;
char *br;
*colon = 0;
colon2 = strrchr(bol, ':');
*colon = ':';
colon = colon2;
br = strrchr(bol, '(');
if(br)
*br = 0;
colon = strrchr(bol, ':');
}
if(!colon) {
logg("Failed to parse reply\n");
@ -330,10 +331,10 @@ int dsresult(int sockd, int scantype, const char *filename, int *printok, int *e
infected++;
if(filename) {
if(scantype >= STREAM) {
logg("~%s%s\n", filename, colon);
logg("~%s%s FOUND\n", filename, colon);
if(action) action(filename);
} else {
logg("~%s\n", bol);
logg("~%s FOUND\n", bol);
*colon = '\0';
if(action)
action(bol);

Loading…
Cancel
Save