diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-25 17:48:40 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-25 17:48:40 +0200 |
commit | 1c195ab280da561f38e54449e4eb3d6882c69b3b (patch) | |
tree | 12583570730c9e5a1505416aa445666aa1449f6b /test | |
parent | d7aa6d1b2d6f3fc48b8287ea04c741078b22f2da (diff) |
Fix strncpy length parameters to avoid non-nul-terminated strings
Diffstat (limited to 'test')
-rw-r--r-- | test/hciemu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/hciemu.c b/test/hciemu.c index 43cec1ed..9f651bc4 100644 --- a/test/hciemu.c +++ b/test/hciemu.c @@ -1314,7 +1314,8 @@ int main(int argc, char *argv[]) vdev.features[7] = 0x80; memset(vdev.name, 0, sizeof(vdev.name)); - strncpy((char *) vdev.name, "BlueZ (Virtual HCI)", sizeof(vdev.name)); + strncpy((char *) vdev.name, "BlueZ (Virtual HCI)", + sizeof(vdev.name) - 1); vdev.dev_class[0] = 0x00; vdev.dev_class[1] = 0x00; |