From b452a970ea8771586a95f6a8253536e48a73d3bc Mon Sep 17 00:00:00 2001 From: gandalf Date: Sat, 31 Jan 2004 15:33:55 +0000 Subject: Fix even more possibly not zero-terminated strings after copy (Karsten Desler) --- libiptc/libiptc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libiptc') 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; -- cgit v1.2.3