Fixed potential buf in filterread.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Mon, 29 May 2006 19:17:17 +0000 (19:17 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Mon, 29 May 2006 19:17:17 +0000 (19:17 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@617 959494ce-11ee-0310-bf91-de5d638817bd

daemon/transfer.c

index ab862a2..0fea334 100644 (file)
@@ -576,7 +576,7 @@ static void filterread(struct socket *sk, struct transfer *transfer)
        return;
     bufcat(transfer->filterbuf, buf, bufsize);
     free(buf);
        return;
     bufcat(transfer->filterbuf, buf, bufsize);
     free(buf);
-    if((p = memchr(transfer->filterbuf, '\n', transfer->filterbufdata)) != NULL)
+    while((p = memchr(transfer->filterbuf, '\n', transfer->filterbufdata)) != NULL)
     {
        *(p++) = 0;
        if((p2 = strchr(transfer->filterbuf, ' ')) != NULL)
     {
        *(p++) = 0;
        if((p2 = strchr(transfer->filterbuf, ' ')) != NULL)