diff options
author | luokai <l18674732394@163.com> | 2021-06-15 11:27:29 +0800 |
---|---|---|
committer | luokai <l18674732394@163.com> | 2021-06-15 11:27:29 +0800 |
commit | 87447a0ee97379afd3af7713060b7f8473be5529 (patch) | |
tree | 4904a67e39e8395fcfc88ed4ba8ac9af77132cf8 /tools | |
parent | 9cd6f3c5b8461ff813c9a747ea6680e7d7f4ccbd (diff) |
using secure functions safe_strdup
Signed-off-by: luokai <l18674732394.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libinput-record.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 1acd8ad8..b12132fc 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -1986,7 +1986,7 @@ init_output_file(const char *file, bool is_prefix) snprintf(name, sizeof(name), "%s", file); } - return strdup(name); + return safe_strdup(name); } static bool @@ -2509,7 +2509,7 @@ init_hidraw(struct record_context *ctx) hidraw = zalloc(sizeof(*hidraw)); hidraw->fd = fd; - hidraw->name = strdup(entry->d_name); + hidraw->name = safe_strdup(entry->d_name); hidraw->device = dev; list_insert(&dev->hidraw_devices, &hidraw->link); } |