aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/libbsc/abis_nm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index fb6a9572..c9b2aaca 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -2234,6 +2234,7 @@ static int bs11_read_swl_file(struct abis_nm_bs11_sw *bs11_sw)
/* construct new filename */
strncpy(dir, bs11_sw->swl_fname, sizeof(dir));
+ dir[sizeof(dir)-1] = '\0';
strncat(fle->fname, dirname(dir), sizeof(fle->fname) - 1);
strcat(fle->fname, "/");
strncat(fle->fname, file_id, sizeof(fle->fname) - 1 -strlen(fle->fname));