summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 10:28:48 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 17:10:29 +0100
commit18712f0bd1ea9dcad040da996e9f7071dfaec759 (patch)
tree0aed6106da2369223949fa83ff3d82057bd78214
parent96df07708371313348d063032ee341592c27defc (diff)
Fix possible non-null-terminated buffer
Change-Id: I22100c260856991b9a836135b3650e5b8c5449ca Fixes: Coverity CID 57623
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 6f0006cc9..0b360b887 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -568,6 +568,7 @@ DEFUN(ena_subscr_name,
}
strncpy(subscr->name, name, sizeof(subscr->name));
+ subscr->name[sizeof(subscr->name)-1] = '\0';
talloc_free(name);
db_sync_subscriber(subscr);