Skip to content

Commit 9771e21

Browse files
committed
device_listener.c: new_device_id malloc
1 parent a8341fb commit 9771e21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/device_listener.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ dl_status dl_recv_packet(dl_t self, const char *packet, size_t length) {
242242
plist_get_string_val(node, &device_id);
243243

244244
if (device_id && strlen(device_id) == 24) {
245-
char new_device_id[26];
245+
char *new_device_id = malloc(sizeof(char) * 26);
246246

247247
memcpy(new_device_id, device_id, 8);
248248
memcpy(new_device_id + 9, device_id + 8, 17);

0 commit comments

Comments
 (0)