Diff between 3af4b2348823450c134e0565f66b6c90411c1093 and efa3d68daf96d9c64ec1b3b5a0a8ac517c8ae182
Changed Files
| File | Additions | Deletions | Status |
| profiles/input/hog-lib.c | +2 | -1 | modified |
Full Patch
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 @@ static void report_map_read_cb(guint8 status, const guint8 *pdu, guint16 plen,
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;