[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Off by one in confmodule.c

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.

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)

Reply to: