commit | efa3d68daf96d9c64ec1b3b5a0a8ac517c8ae182 | [log] [tgz] |
---|---|---|
author | Marcel Holtmann <marcel@holtmann.org> | Wed May 23 16:35:43 2018 +0200 |
committer | Marcel Holtmann <marcel@holtmann.org> | Wed May 23 16:35:43 2018 +0200 |
tree | 314b0ebe0ca8640c17128179038932f8b2c1c831 | |
parent | 3af4b2348823450c134e0565f66b6c90411c1093 [diff] |
input: Fix compiler warning from wrong array size
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c index dab385f..d9ed806 100644 --- a/profiles/input/hog-lib.c +++ b/profiles/input/hog-lib.c
@@ -998,7 +998,8 @@ return; } - strncpy((char *) ev.u.create.name, hog->name, sizeof(ev.u.create.name)); + strncpy((char *) ev.u.create.name, hog->name, + sizeof(ev.u.create.name) - 1); ev.u.create.vendor = hog->vendor; ev.u.create.product = hog->product; ev.u.create.version = hog->version;