[PATCH 08/34] Added explicit null termination of the hostname buffer

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

 



Based on From Marius Tomaschewski <mt@xxxxxxx> work on ulogd.

Signed-off-by: Eric leblond <eric@xxxxxx>
---
:100644 100644 41ebe5b... bf400d7... M	filter/raw2packet/ulogd_raw2packet_LOCAL.c
 filter/raw2packet/ulogd_raw2packet_LOCAL.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/filter/raw2packet/ulogd_raw2packet_LOCAL.c b/filter/raw2packet/ulogd_raw2packet_LOCAL.c
index 41ebe5b..bf400d7 100644
--- a/filter/raw2packet/ulogd_raw2packet_LOCAL.c
+++ b/filter/raw2packet/ulogd_raw2packet_LOCAL.c
@@ -92,6 +92,7 @@ void _init(void)
                   strerror(errno));
         exit(2);
     }
+    hostname[sizeof(hostname)-1] = '\0';
     /* strip off everything after first '.' */
     if ((tmp = strchr(hostname, '.')))
         *tmp = '\0';
-- 
1.5.2.5

-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux