The read could fill the whole buffer and we put a null-char at the end of the read data so we could write on a byte just after our buffer.

Baruch
Index: confmodule.c
===================================================================
--- confmodule.c	(revision 47280)
+++ confmodule.c	(working copy)
@@ -84,7 +84,7 @@
                 return DC_OK;
             }
 
-            ret = read(mod->infd, buf, sizeof(buf));
+            ret = read(mod->infd, buf, sizeof(buf)-1);
             if (ret < 0) {
                 if (errno == EINTR)
                     continue;

Reply via email to