OSDN Git Service

isdn/gigaset: make sure controller name is null terminated
authorTilman Schmidt <tilman@imap.cc>
Sat, 11 Oct 2014 11:46:29 +0000 (13:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Oct 2014 19:05:33 +0000 (15:05 -0400)
commitee7ff5fed25711a26da7826071e6ede8af049ad2
treeb3335735c602a3dc1ac1ec1b5dbb580225c30f90
parent1bdc07ebabefd19b56d1d36584a401ff6085fa71
isdn/gigaset: make sure controller name is null terminated

In gigaset_isdn_regdev, the name field may not have a null terminator
if the source string's length is equal to the buffer size.
Fix by zero filling the structure and excluding the last byte of the
name field from the copy.

Spotted with Coverity.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/capi.c