]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
From: Eric Leblond <eric@inl.fr>:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>
Sun, 3 Feb 2008 11:37:50 +0000 (11:37 +0000)
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>
Sun, 3 Feb 2008 11:37:50 +0000 (11:37 +0000)
Added explicit null termination of the hostname buffer
This patch is a backport of Marius Tomaschewski <mt@suse.de> work on ulogd.

filter/raw2packet/ulogd_raw2packet_LOCAL.c

index 41ebe5be10ceff44f3257023b7a05da102c6428b..bf400d7e8e195074bf63b36c7980ff4e3a7094d7 100644 (file)
@@ -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';