diff options
author | Richard Hughes <richard@hughsie.com> | 2015-10-14 11:31:33 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-10-14 18:19:41 +0100 |
commit | ec2d20d94bc2b795f20ba2f66ec96f7522b39230 (patch) | |
tree | 7945b32265890848d6fae2c289ff7bc73cdf4c1c | |
parent | c29b493cc608456eebf4676cf507f8abbf4c00e5 (diff) | |
download | colord-ec2d20d94bc2b795f20ba2f66ec96f7522b39230.tar.gz |
libospark: Don't assume the seral number buffer is NUL terminated
-rw-r--r-- | lib/ospark/osp-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ospark/osp-device.c b/lib/ospark/osp-device.c index 8dff30f..b734ffa 100644 --- a/lib/ospark/osp-device.c +++ b/lib/ospark/osp-device.c @@ -257,7 +257,7 @@ osp_device_get_serial (GUsbDevice *device, GError **error) } /* format value */ - return g_strdup ((const gchar *) data); + return g_strndup ((const gchar *) data, data_len); } /** |