summaryrefslogtreecommitdiffstats
path: root/libiptc
diff options
context:
space:
mode:
authorgandalf <gandalf>2004-01-31 15:33:55 +0000
committergandalf <gandalf>2004-01-31 15:33:55 +0000
commitb452a970ea8771586a95f6a8253536e48a73d3bc (patch)
treeb29bb39cfef731e863db577f1ff161e4bf5d3f5f /libiptc
parent32be9ea0651809e288d7f44550b2eed7ba582575 (diff)
Fix even more possibly not zero-terminated strings after copy (Karsten Desler)
Diffstat (limited to 'libiptc')
-rw-r--r--libiptc/libiptc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c
index ba2e35e..3aacb54 100644
--- a/libiptc/libiptc.c
+++ b/libiptc/libiptc.c
@@ -1,4 +1,4 @@
-/* Library which manipulates firewall rules. Version $Revision: 1.41 $ */
+/* Library which manipulates firewall rules. Version $Revision: 1.43 $ */
/* Architecture of firewall rules is as follows:
*
@@ -526,6 +526,7 @@ add_chain_cache(TC_HANDLE_T h, const char *name, unsigned int start_off,
h->cache_num_chains++;
strncpy(newcc->name, name, TABLE_MAXNAMELEN-1);
+ newcc->name[TABLE_MAXNAMELEN-1] = '\0';
newcc->start_off = start_off;
newcc->end_off = end_off;