From 0b72e68c794c5c0ca21a46fc89bcb82e645e8c68 Mon Sep 17 00:00:00 2001 From: "liyinong (A)" Date: Tue, 26 Jan 2021 17:39:18 +0800 Subject: [PATCH] test --- app/src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/device.c b/app/src/device.c index f4c2628b..1ab8adcd 100644 --- a/app/src/device.c +++ b/app/src/device.c @@ -11,7 +11,7 @@ device_read_info(socket_t device_socket, char *device_name, struct size *size) { LOGE("Could not retrieve device information"); return false; } - // in case the client sends garbage + // in case the client sends garbage! buf[DEVICE_NAME_FIELD_LENGTH - 1] = '\0'; // strcpy is safe here, since name contains at least // DEVICE_NAME_FIELD_LENGTH bytes and strlen(buf) < DEVICE_NAME_FIELD_LENGTH