summaryrefslogtreecommitdiff
path: root/sethdlc-new.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-10-31 21:08:15 +0000
committermmichelson <mmichelson@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-10-31 21:08:15 +0000
commitf764bc73f672913f02becc4fc78b777a700d2b20 (patch)
tree504043f960bdc2b8e7ab52ad0d7c7b5b947e3a6c /sethdlc-new.c
parent0b50f661cb6235821c15e0daf1093f697cab137f (diff)
Fixed potential buffer overflow.
See AST-2007-024 for more details git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3205 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'sethdlc-new.c')
-rw-r--r--sethdlc-new.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sethdlc-new.c b/sethdlc-new.c
index 4a4a7bb..1765c32 100644
--- a/sethdlc-new.c
+++ b/sethdlc-new.c
@@ -673,7 +673,7 @@ int main(int arg_c, char *arg_v[])
if (sock < 0)
error("Unable to create socket: %s\n", strerror(errno));
- strcpy(req.ifr_name, argv[1]); /* Device name */
+ strncpy(req.ifr_name, argv[1], sizeof(req.ifr_name) - 1); /* Device name */
if (argc == 2)
show_port();