- /* Really search for virus again? */
- if (malware_name == NULL)
- /* try matcher on the line, grab substring */
- malware_name = m_pcre_exec(fs_inf, av_buffer);
+ for (p[bread] = '\0'; q = strchr(p, '\n'); p = q+1)
+ {
+ *q = '\0';
+
+ /* Really search for virus again? */
+ if (!malware_name)
+ /* try matcher on the line, grab substring */
+ malware_name = m_pcre_exec(fs_inf, p);
+
+ if (Ustrstr(p, "OK\tScan ok."))
+ goto fsec_found;
+ }
+
+ /* copy down the trailing partial line then read another chunk */
+ i = av_buffer+sizeof(av_buffer)-p;
+ memmove(av_buffer, p, i);
+ p = av_buffer+i;
+ }