From f764bc73f672913f02becc4fc78b777a700d2b20 Mon Sep 17 00:00:00 2001 From: mmichelson Date: Wed, 31 Oct 2007 21:08:15 +0000 Subject: 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 --- sethdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sethdlc.c') diff --git a/sethdlc.c b/sethdlc.c index 3514b2e..afbcb20 100644 --- a/sethdlc.c +++ b/sethdlc.c @@ -293,7 +293,7 @@ int main(int argc, char *argv[]) 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(sock); -- cgit v1.2.3